OFFSET
0,1
COMMENTS
For n > 0, if n is odd, then a(n) is the unique number in {0, 2, 4, 6, 8} such that A321288(n) + a(n)*5^n divides 5^(n+1); if n is even, then a(n) is the unique number in {1, 3, 5, 7, 9} such that A321288(n) + a(n)*5^n divides 5^(n+1).
The unique 10-adic even integer with alternating even and odd digits whose 5-adic valuation is +oo is given by 10*x. - Jianing Song, Feb 24 2021
EXAMPLE
x = ...72923836367090189014561474323272705078125.
MATHEMATICA
nmax = 87; v[1] = 5; For[i = 2, i <= nmax, i++, For[j = 0, j <= 4, j++, t = v[i-1] + (2j + Mod[i, 2]) 10^(i-1); If[Mod[t, 5^i] == 0, v[i] = t; Break[]]]];
a[0] = 5; a[n_] := (v[n+1] - v[n])/10^n;
Table[a[n], {n, 0, nmax-1}] (* Jean-François Alcover, Nov 23 2018, from PARI *)
PROG
(PARI) seq(n)={my(v=vector(n)); v[1]=5; for(i=2, n, for(j=0, 4, my(t=v[i-1] + (2*j + i%2)*10^(i-1)); if(t%(5^i)==0, v[i]=t; break))); v}
a(n) = if(n, my(j=seq(n+1)); (j[n+1] - j[n])/10^n, 5)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Nov 02 2018
STATUS
approved