A135251 Maximal number of zero digits in square of number with n digits not divisible by 10.
0, 1, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124
Offset: 1
Crossrefs
Programs
-
Mathematica
(*For a(7)*) mx = 0; Do[Do[Do[Do[Do[Do[Do[k = 10^6b + 10^5q + 10^4r + 10^3p + 10^2s + 10n + m; w = IntegerDigits[k^2]; ile = 0; Do[If[w[[t]] == 0, ile = ile + 1; If[ile > mx, mx = ile]], {t, 1, Length[w]}], {m, 1, 9}], {n, 0, 9}], {s, 0, 9}], {p, 0, 9}], {r, 0, 9}], {q, 0, 9}], {b, 1, 9}]; mx
Formula
2*n-4 <= a(n) <= 2*n-2 since, if k is an n-digit number not divisible by 10, then k^2 has at most 2*n digits of which the first and last are nonzero; and for n >= 2, the square of the n-digit number 10^(n-1)+1 contains 2*n-4 zeros. It seems likely that a(n) = 2*n-4 for all n >= 4. - Pontus von Brömssen, Jun 09 2025
Extensions
a(8)-a(64) from Pontus von Brömssen, Jun 09 2025