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.

A215732 a(n) is the first digit to appear n times in succession in a power of 2.

This page as a plain text file.
%I A215732 #39 Sep 24 2024 10:05:59
%S A215732 1,5,7,5,6,8,7,1,9,9,6,3,2,9,1,4,1
%N A215732 a(n) is the first digit to appear n times in succession in a power of 2.
%C A215732 Assumes that there are no 2 digits that appear n times in succession for the first time in the same power of 2. - _Chai Wah Wu_, Apr 26 2019
%e A215732 2^16 = 65536 is the first power of 2 with a repeated digit (cf. A045875), with 5 repeated, so a(2) = 5. - _N. J. A. Sloane_, Aug 23 2012
%t A215732 n = 1; x = 1; lst = {};
%t A215732 For[i = 1, i <= 10000, i++,
%t A215732 z = Split[IntegerDigits[x]]; a = Length /@ z; b = Max[a];
%t A215732 For[j = n, j <= b, j++,
%t A215732   AppendTo[lst, First[First[Part[z, First[Position[a, b]]]]]]; n++
%t A215732 ]; x = 2 x ]; lst (* _Robert Price_, Mar 16 2019 *)
%o A215732 (Python)
%o A215732 def A215732(n):
%o A215732     l, x = [str(d)*n for d in range(10)], 1
%o A215732     for m in range(10**9):
%o A215732         s = str(x)
%o A215732         for k in range(10):
%o A215732             if l[k] in s:
%o A215732                 return k
%o A215732         x *= 2
%o A215732     return 'search limit reached'
%o A215732 # _Chai Wah Wu_, Dec 17 2014
%Y A215732 Cf. A045875, A215733, A215734, A215735.
%K A215732 nonn,base,hard,more
%O A215732 1,2
%A A215732 _V. Raman_, Aug 22 2012
%E A215732 a(11)-a(13) added by _T. D. Noe_, Sep 04 2012
%E A215732 a(14) added by _T. D. Noe_, Sep 06 2012
%E A215732 a(15) from _Bert Dobbelaere_, Feb 25 2019
%E A215732 a(16) from _Paul Geneau de Lamarlière_, Jun 26 2024
%E A215732 a(17) from _Paul Geneau de Lamarlière_, Sep 24 2024