A210849 a(n) = (A048899(n)^2 + 1)/5^n, n >= 0.
1, 2, 13, 37, 314, 365, 73, 13369, 31226, 1432954, 1346393, 10982633, 59784881, 986508685, 197301737, 12342639754, 16335212753, 165277755905, 33055551181, 12781804411945, 2556360882389, 25830314642530
Offset: 0
Examples
a(0) = 1/1 = 1. a(3) = (68^2 + 1)/5^3 = 37 (b(3) = 18^5 (mod 5^3) = 68).
Programs
-
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 *)
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).
Comments