cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A147884 a(n) is the smallest positive integer k such that the last n digits of 2^k are 1 or 2.

This page as a plain text file.
%I A147884 #19 Dec 26 2024 13:32:41
%S A147884 1,9,89,89,589,3089,3089,3089,315589,315589,8128089,164378089,
%T A147884 945628089,1922190589,11687815589,109344065589,231414378089,
%U A147884 1452117503089,4503875315589,65539031565589,141832976878089,1667711883128089,3575060515940589
%N A147884 a(n) is the smallest positive integer k such that the last n digits of 2^k are 1 or 2.
%H A147884 Minfeng Wang, <a href="/A147884/b147884.txt">Table of n, a(n) for n = 1..1429</a>
%F A147884 a(n) = the smallest degree k such that 2^k == A053312(n) (mod 5^n).
%o A147884 (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); ) }
%o A147884 (Python)
%o A147884 from itertools import count, islice
%o A147884 from sympy import discrete_log
%o A147884 def A147884_gen(): # generator of terms
%o A147884     a, b, c = 0, 1, 1
%o A147884     for n in count(0):
%o A147884         a+=b*c if (a>>n)&1 else b*c<<1
%o A147884         c *= 5
%o A147884         yield int(discrete_log(c,a,2))
%o A147884         b <<= 1
%o A147884 A147884_list = list(islice(A147884_gen(),20)) # _Chai Wah Wu_, Mar 16 2023
%Y A147884 Cf. A053312
%K A147884 base,easy,nonn
%O A147884 1,2
%A A147884 _Max Alekseyev_, Nov 17 2008
%E A147884 Extended by _Minfeng Wang_, Dec 15 2024