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.

A342575 a(n) is the exponent of the least power of 2 such that the concatenated digits of the decimal expansion of 2^n are a proper substring of the concatenated digits of the decimal expansion of 2^a(n).

This page as a plain text file.
%I A342575 #29 Mar 20 2021 13:49:43
%S A342575 4,5,6,7,14,15,26,102,103,104,224,103,104,105,506,507,452,1169,1170,
%T A342575 1171,8228,10419,15186,5227,16619,16620,16621,25102,130090,62640,
%U A342575 330791,330792,351403,273100,681504,649069,352375,3045104,3045105,3635007,9532211,7819691,3091425,3091426
%N A342575 a(n) is the exponent of the least power of 2 such that the concatenated digits of the decimal expansion of 2^n are a proper substring of the concatenated digits of the decimal expansion of 2^a(n).
%e A342575    n   2^n  a(n)  2^a(n)
%e A342575    0     1    4  _1_6
%e A342575    1     2    5   3_2_
%e A342575    2     4    6   6_4_
%e A342575    3     8    7   12_8_
%e A342575    4    16   14  _16_384
%e A342575    5    32   15  _32_768
%e A342575    6    64   26   671088_64_
%e A342575    7   128  102   50706024009129176059868_128_21504
%e A342575    8   256  103   101412048018258352119736_256_43008
%e A342575    9   512  104   202824096036516704239472_512_86016
%e A342575   10  1024  224   2695994666715 ... 06736371444225405724811036_1024_9216
%e A342575   11  2048  103   10141_2048_01825835211973625643008
%e A342575   12  4096  104   20282_4096_03651670423947251286016
%e A342575   13  8192  105   40564_8192_07303340847894502572032
%p A342575 a:= proc(n) local k, p; p:= ""||(2^n); for k
%p A342575       from n+1 while searchtext(p, ""||(2^k))=0 do od; k
%p A342575     end:
%p A342575 seq(a(n), n=0..24);  # _Alois P. Heinz_, Mar 17 2021
%o A342575 (Python)
%o A342575 def a(n):
%o A342575   k, twok, target = n+1, 2**(n+1), str(2**n)
%o A342575   while target not in str(twok): k, twok = k+1, twok*2
%o A342575   return k
%o A342575 print([a(n) for n in range(27)]) # _Michael S. Branicky_, Mar 16 2021
%o A342575 (PARI) vecmatch(vshort,vlong)={my(l=#vshort,L=#vlong);for(i=0,L-l,if(vshort==vlong[i+1..i+l],return(i+1)));0}
%o A342575 for(n=0,26,my(vx=digits(2^n));for(y=n+1,oo,my(vy=digits(2^y));if(vecmatch(vx,vy)>0,print1(y,", ");break)))
%o A342575 (PARI) a(n) = my(k=n+1, s=Str(2^n)); while (#strsplit(Str(2^k), s) <=1, k++); k; \\ _Michel Marcus_, Mar 17 2021
%Y A342575 Cf. A342601.
%K A342575 nonn,base
%O A342575 0,1
%A A342575 _Hugo Pfoertner_, Mar 16 2021
%E A342575 a(28)-a(36) from _Jon E. Schoenfield_, confirmed by _Michael S. Branicky_, Mar 17 2021
%E A342575 a(37)-a(43) from _Bert Dobbelaere_, Mar 19 2021