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.
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
Examples
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.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A075309.
Programs
-
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 *)
-
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
Extensions
Edited and extended by David Wasserman, Jun 27 2006
Comments