A215732 a(n) is the first digit to appear n times in succession in a power of 2.
1, 5, 7, 5, 6, 8, 7, 1, 9, 9, 6, 3, 2, 9, 1, 4, 1
Offset: 1
Examples
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
Programs
-
Mathematica
n = 1; x = 1; lst = {}; For[i = 1, i <= 10000, i++, z = Split[IntegerDigits[x]]; a = Length /@ z; b = Max[a]; For[j = n, j <= b, j++, AppendTo[lst, First[First[Part[z, First[Position[a, b]]]]]]; n++ ]; x = 2 x ]; lst (* Robert Price, Mar 16 2019 *)
-
Python
def A215732(n): l, x = [str(d)*n for d in range(10)], 1 for m in range(10**9): s = str(x) for k in range(10): if l[k] in s: return k x *= 2 return 'search limit reached' # Chai Wah Wu, Dec 17 2014
Extensions
a(11)-a(13) added by T. D. Noe, Sep 04 2012
a(14) added by T. D. Noe, Sep 06 2012
a(15) from Bert Dobbelaere, Feb 25 2019
a(16) from Paul Geneau de Lamarlière, Jun 26 2024
a(17) from Paul Geneau de Lamarlière, Sep 24 2024
Comments