OFFSET
1,2
COMMENTS
Of course leading zeros are omitted.
a(3) gives the last 10 digits of Graham's number.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Power Tower.
FORMULA
a(n) = n^(n^(n^(n^(n^(n^(n^(n^(n^(n^n mod 10) mod 100) mod 1000) mod 10000) mod 100000) mod 1000000) mod 10000000) mod 100000000) mod 1000000000) mod 10000000000.
EXAMPLE
3^3 mod 10 = 7; 3^7 mod 100 = 87; 3^87 mod 1000 = 387; 3^387 mod 10000 = 5387; 3^5387 mod 100000 = 95387; 3^95387 mod 1000000 = 195387; 3^195387 mod 10000000 = 4195387; 3^4195387 mod 100000000 = 64195387; 3^64195387 mod 1000000000 = 464195387; 3^464195387 mod 10000000000 = 2464195387; so the last 10 digits of 3^3^3^3^3^3^3^3^3^3^3^3^3^... are 2464195387 and a(3) = 2464195387.
MAPLE
a:= proc(n) local i, m; if irem(n, 10)=0 then 0 else m:= n; for i from 1 to 10 do m:= n&^m mod 10^i od; m fi end: seq(a(n), n=1..30); # Alois P. Heinz, Sep 28 2009
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ivan Panchenko, Sep 25 2009
EXTENSIONS
Edited (but not checked) by N. J. A. Sloane, Sep 28 2009
Corrected and extended by Alois P. Heinz, Sep 28 2009
STATUS
approved