A381678 a(n) is the least exponent k such that there are exactly n 1's in the decimal expansion of 11^k, or -1 if no such k exists.
0, 1, 5, 11, 21, 26, 31, 41, 51, 55, 58, 54, 72, 73, 91, 113, 116, 107, 150, 147, 103, 152, 158, 199, 181, 202, 165, 186, 215, 218, 238, 231, 273, 255, 266, 232, 302, 317, 297, 294, 327, 320, 293, 398, 339, 340, 350, 356, 406, 361, 380, 421, 391, 330, 401, 429, 438, 474, 388
Offset: 1
Examples
a(1) = 0 since 11^0 = 1 has one occurrence of the decimal digit 1. a(2) = 1 since 11^1 = 11 which has just two decimal digits of 1; a(3) = 5 since 11^5 = 161051 which has just three decimal digits of 1; a(4) = 11 since 11^11 = 285311670611 which has just four decimal digits of 1; etc.
Programs
-
Mathematica
t[_] := -1; k = 0; While[k < 1000, a = DigitCount[11^k, 10, 1]; If[t[a] == -1, t[a] = k]; k++]; t /@ Range[0, 100]
-
PARI
a(n) = my(k=0); while (#select(x->(x==1), digits(11^k)) != n, k++); k; \\ Michel Marcus, Mar 04 2025
Comments