OFFSET
0,2
COMMENTS
a(n) is an integer (nonnegative) because b(n):=A048899(n) satisfies b(n)^2 + 1 == 0 (mod 5^n), n>=0. The solution of this congruence for n>=1, which satisfies also b(n) == 3 (mod 5), is b(n) = 3^(5^(n-1)) (mod 5^n), but this is inconvenient for computing b(n) for large n. Instead one can use the b(n) recurrence which follows immediately, and this is given in the formula field below. To prove that the given b(n) formula solves the first congruence one can analyze the binomial expansion of (10 - 1)^(5^(n-1)) + 1 and show that it is 0 (mod 5^n) term by term. The second congruence reduces to b(n) == 3^(5^(n-1)) (mod 5) which follows for n>=1 by induction. Because b(n) = 5^n - A048898(n) one could also use the result A048898(n) == 2 (mod 5) once this is proved.
See also the comment on A210848 on two relevant theorems.
FORMULA
a(n) = (b(n)^2 + 1)/5^n, n>=0, with b(n) = A048899(n) given by the recurrence b(n) = b(n-1)^5 (mod 5^n), n>=2, b(0):=0, b(1)=3 (this is the analog of the Mathematica Program by Jean-François Alcover for A048898).
EXAMPLE
a(0) = 1/1 = 1.
a(3) = (68^2 + 1)/5^3 = 37 (b(3) = 18^5 (mod 5^3) = 68).
MAPLE
b:=proc(n) option remember: if n=0 then 0 elif n=1 then 3
else modp(b(n-1)^5, 5^n) fi end proc:
[seq((b(n)^2+1)/5^n, n=0..29)];
MATHEMATICA
b[n_] := b[n] = Which[n == 0, 0, n == 1, 3, True, Mod[b[n-1]^5, 5^n]]; Table[(b[n]^2+1)/5^n, {n, 0, 29}] (* Jean-François Alcover, Mar 05 2014, after Maple *)
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Wolfdieter Lang, Apr 28 2012
STATUS
approved