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.

A171252 Least power of 2 to have at least n consecutive digits 'n' in its decimal expansion.

This page as a plain text file.
%I A171252 #4 Jul 22 2025 07:31:20
%S A171252 0,0,43,83,192,973,2269,972,25263,42485
%N A171252 Least power of 2 to have at least n consecutive digits 'n' in its decimal expansion.
%C A171252 As it stands, the definition makes only sense for (decimal digits) n=0,...,9. Replacing "decimal" by, e.g., base-(prime(n)), the sequence could be defined for all n. (However, e.g., base-(n+1) would not work, since in base 4 no power of 2 has a digit "3".)
%o A171252 (PARI) A171252(n)={my(p=10^n, t); n*=p\9; for(k=0,1e9, t=2^k; until( n>t\=10, t%p==n & return(k)))}
%o A171252 for(d=0,9, print(d" "A171252(d)))
%Y A171252 Cf. A131535 - A131543.
%K A171252 base,fini,full,nonn
%O A171252 0,3
%A A171252 _M. F. Hasler_, Dec 06 2009