login
A078255
Squares with distinct digits. To make an infinite sequence, we also include m-digit numbers in which each digit occurs no more than ceiling(m/10) times.
10
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 169, 196, 256, 289, 324, 361, 529, 576, 625, 729, 784, 841, 961, 1024, 1089, 1296, 1369, 1764, 1849, 1936, 2304, 2401, 2601, 2704, 2809, 2916, 3025, 3249, 3481, 3721, 4096, 4356, 4761, 5041, 5184, 5329, 5476, 6084, 6241
OFFSET
1,3
COMMENTS
The largest square with no digit repeated more than m times, for m = 1 to 4: 99066^2 = 9814072356; 9994363488^2 = 99887301530267526144; 999944387118711^2 = 999888777330214565264406301521; 99999444387327303945^2 = 9999888877774166231060453541302412563025.
There are exactly 87 10-digit squares with distinct digits. - Harvey P. Dale, Sep 06 2020
LINKS
EXAMPLE
100116^2 = 10023213456 is a term because it has 11 digits,
ceiling(11/10) = 2 and no digit occurs more than twice. This is the first term after 9814072356.
MATHEMATICA
Select[Range[0, 80]^2, Max[DigitCount[#]]==1&] (* The program only selects numbers with no more than 10 digits, and even that would require changing the high Range constant to 100000. *) (* Harvey P. Dale, Sep 06 2020 *)
PROG
(Python)
from itertools import count, islice
def c(n): return all((s:=str(n)).count(d)<=(len(s)-1)//10+1 for d in "0123456789")
def agen(): yield from filter(c, (k*k for k in count(0)))
print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 29 2023
CROSSREFS
Cf. A075309.
Sequence in context: A014186 A052062 A052046 * A077356 A077357 A294497
KEYWORD
base,nonn,easy
AUTHOR
Amarnath Murthy, Nov 24 2002
EXTENSIONS
Edited and extended by David Wasserman, Jun 27 2006
STATUS
approved