login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147884 a(n) is the smallest positive integer k such that the last n digits of 2^k are 1 or 2. 0
1, 9, 89, 89, 589, 3089, 3089, 3089, 315589, 315589, 8128089, 164378089, 945628089, 1922190589, 11687815589, 109344065589, 231414378089, 1452117503089, 4503875315589, 65539031565589, 141832976878089, 1667711883128089 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
A147884_list = list(islice(A147884_gen(), 20)) # Chai Wah Wu, Mar 16 2023
CROSSREFS
Sequence in context: A084015 A231155 A279166 * A178369 A328492 A306686
KEYWORD
base,easy,nonn
AUTHOR
Max Alekseyev, Nov 17 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:39 EDT 2024. Contains 371967 sequences. (Running on oeis4.)