OFFSET
1,2
FORMULA
a(n) = the smallest degree k such that 2^k == A053312(n) (mod 5^n)
PROG
(PARI) { m=2; for(n=1, 50, print1(znlog(m, Mod(2, 5^n)), ", "); m+=10^n; if(m%(2^(n+1)), m+=10^n); ) }
(Python)
from itertools import count, islice
from sympy import discrete_log
def A147884_gen(): # generator of terms
a, b, c = 0, 1, 1
for n in count(0):
a+=b*c if (a>>n)&1 else b*c<<1
c *= 5
yield int(discrete_log(c, a, 2))
b <<= 1
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Max Alekseyev, Nov 17 2008
STATUS
approved