Nothing Special   »   [go: up one dir, main page]

login
A061277
Numbers which have more different digits than their squares.
2
109, 173, 235, 264, 1049, 1235, 1485, 1489, 1490, 1498, 1703, 1730, 1823, 1834, 2107, 2108, 2350, 2357, 2435, 2538, 2581, 2640, 2830, 2978, 2980, 2983, 3114, 3148, 3157, 3408, 4827, 5162, 5470, 5480, 5962, 6380, 6498, 6742, 6912, 7450, 8130, 8167, 9235, 9607
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
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
Sequence in context: A141948 A102908 A141998 * A142945 A142079 A142224
KEYWORD
nonn,base
AUTHOR
Ulrich Schimke (ulrschimke(AT)aol.com)
EXTENSIONS
a(36) and beyond from Michael S. Branicky, Apr 20 2023
STATUS
approved