A215731 a(n) is the smallest m for which the decimal representation of 11^m contains n consecutive identical digits.
0, 1, 8, 39, 156, 482, 1323, 2983, 9443, 39879, 214747, 296095, 296095, 5541239, 8621384, 30789328
Offset: 1
Examples
The decimal representation of 11^39879 contains ten consecutive 6s, and is the least such power with such a string of digits.
Programs
-
Mathematica
mostDigits[t_] := Module[{lastDigit = t[[1]], record = 1, cnt = 1}, Do[If[t[[n]] == lastDigit, cnt++, If[cnt > record, record = cnt]; cnt = 1; lastDigit = t[[n]]], {n, 2, Length[t]}]; If[cnt > record, record = cnt] ; record]; nn = 10; t = Table[-1, {nn}]; n = -1; While[Min[t] == -1, n++; c = mostDigits[IntegerDigits[11^n]]; If[c > nn, c = nn]; While[c > 0 && t[[c]] == -1, t[[c]] = n; c--]]; t (* T. D. Noe, Apr 29 2013 *)
-
Python
def A215731(n): l, x = [str(d)*n for d in range(10)], 1 for m in range(10**9): s = str(x) for k in l: if k in s: return m x *= 11 return 'search limit reached' # Chai Wah Wu, Dec 17 2014
Extensions
a(10) discovered by "Wick" (See http://www.mersenneforum.org/showpost.php?p=334789&postcount=89). Definition clarified and all terms to a(10) verified by Daran Gill, Mar 24 2013
a(11) discovered by Tom Womack (See http://www.mersenneforum.org/showpost.php?p=337916&postcount=105), Rick van der Hoorn, Apr 24 2013
a(12)-a(13) from Giovanni Resta, Apr 25 2013
Corrected a(12), Rick van der Hoorn, Apr 28 2013
a(14) from Giovanni Resta, Apr 18 2016
a(15) from Bert Dobbelaere, Feb 15 2019
a(16) from Paul Geneau de Lamarlière, Oct 03 2024