A379603 a(n) is the largest n-digit number whose square contains only digits greater than 5.
3, 83, 937, 9833, 98336, 998333, 9994833, 99983333, 999939437, 9999833333, 99998333336, 999998333333, 9999983333336, 99999983333333, 999999833333336, 9999999833333333, 99999998333333336, 999999998333333333, 9999999983333333336, 99999999983333333333, 999999999833333333336
Offset: 1
Examples
a(3) = 937 because among all 3-digit numbers, 937 is the largest whose square 877969 contains only digits greater than 5.
Programs
-
Mathematica
f[m_] := For[k = 10^m - 1, k > 10^(m - 1), k--, If[Min@IntegerDigits[k^2] > 5, Return[k];]]; Table[f[m], {m, 10}]
Formula
Conjecture: It appears that for all n >= 5,
a(2*n) = 100^n - (5*10^n + 1)/3, and
a(2*n + 1) = 10*a(2*n) + 6.
Extensions
a(20)-a(21) from Jinyuan Wang, Dec 27 2024