OFFSET
1,1
COMMENTS
The sequence is infinite since for every element k with '0' as last digit or no '0' at all every k*10^m is also in it.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
3114 is okay, since it has three different digits while 3114^2 = 9696996 has only two.
MATHEMATICA
Select[Range[6000], Count[DigitCount[#], 0]<Count[DigitCount[#^2], 0]&] (* Harvey P. Dale, Jul 19 2019 *)
PROG
(PARI) isok(n) = length(Set(digits(n, 10))) > length(Set(digits(n^2, 10))) \\ Michel Marcus, Jul 22 2013
(Python)
def ok(n): return len(set(str(n))) > len(set(str(n**2)))
print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Apr 20 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ulrich Schimke (ulrschimke(AT)aol.com)
EXTENSIONS
a(36) and beyond from Michael S. Branicky, Apr 20 2023
STATUS
approved