OFFSET
1,2
COMMENTS
0 <= a(n)-10*a(n-1)<10
All terms are prefixes of later terms.
EXAMPLE
reverse(11^11)=116076113582 =>a(2)=11 reverse(111^111)=117...... =>a(3)=117 reverse(1111^111)=1178....=>a(4)=1178
MATHEMATICA
repunit[n_] := Sum[10^i, {i, 0, n - 1}]; a[n_]:= FromDigits[Reverse[IntegerDigits[repunit[n]^repunit[n]]][[1 ;; n]]]; Table[a[n], {n, 1, 7}]
repunit[n_] := Sum[10^i, {i, 0, n - 1}]; h[n_] := If[(b = (1 +Floor@Log[10, aux = FromDigits@Reverse@IntegerDigits@PowerMod[repunit[n], repunit[n], 10^n]])) < n, aux*10^(n - b), aux] (*Suggested by Jorge Jimenez Meana*) [From José María Grau Ribas, Mar 01 2010]
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
José María Grau Ribas, Feb 22 2010
STATUS
approved