login
A359345
Roots of largest pandigital squares with n digits.
2
99066, 315996, 999366, 3162039, 9999629, 31622524, 99999629, 316227746, 999999629, 3162277591, 9999999629, 31622776461, 99999999629, 316227765995, 999999999629, 3162277660155, 9999999999629, 31622776601681, 99999999999629, 316227766016811, 999999999999629
OFFSET
10,1
COMMENTS
Pandigital squares are perfect squares containing each digit from 0 to 9 at least once.
FORMULA
a(n) = sqrt(A359344(n)).
a(n) = (10^(n/2-3) - 1)*10^3 + 629 for n >= 14 even.
PROG
(Python)
from math import isqrt
def c(n): return len(set(str(n))) == 10
def a(n):
ub, lb = isqrt(10**n-1), isqrt(10**(n-1)) if n&1 else isqrt(10**(n-1))+1
return next((k for k in range(ub, lb-1, -1) if c(k*k)), None)
print([a(n) for n in range(10, 31)]) # Michael S. Branicky, Dec 27 2022
CROSSREFS
Sequence in context: A163679 A106776 A238296 * A093778 A234494 A255760
KEYWORD
nonn,base
AUTHOR
Martin Renner, Dec 27 2022
STATUS
approved