login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359341 Number of pandigital squares with n digits. 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 504, 4275, 29433, 179235, 955818, 4653802, 21034628, 89834238, 366490378, 1440743933, 5493453262 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
Pandigital squares are perfect squares containing each digit from 0 to 9 at least once.
LINKS
EXAMPLE
a(n) = 0 for n < 10, since a number must have at least ten digits to contain all digits from 0 to 9 at least once.
a(10) = 87 since there are 87 ten-digit pandigital squares from 1026753849 to 9814072356 (cf. A036745) containing each digit from 0 to 9, here exactly once.
MAPLE
a:=proc(n::posint) local p, k, K: if n<10 then p:=0; else p:=0: for k from ceil(sqrt(10^(n-1))) to floor(sqrt(10^n)) do K:=convert(k^2, base, 10); if nops({op(K)})=10 then p:=p+1: fi: od: fi: return p; end:
PROG
(Python)
from math import isqrt
def c(n): return len(set(str(n))) == 10
def a(n):
lb = isqrt(10**(n-1)) if n&1 else isqrt(10**(n-1)) + 1
return sum(1 for k in range(lb, isqrt(10**n-1)+1) if c(k*k))
print([a(n) for n in range(1, 14)]) # Michael S. Branicky, Dec 27 2022
CROSSREFS
Sequence in context: A183724 A221312 A098139 * A297509 A259510 A109601
KEYWORD
nonn,base
AUTHOR
Martin Renner, Dec 27 2022
EXTENSIONS
a(19)-a(21) from Michael S. Branicky, Dec 27 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 14:24 EDT 2024. Contains 374284 sequences. (Running on oeis4.)