login
Nonnegative integers that when written out in full in English have no repeated letter.
5

%I #24 Apr 21 2023 11:37:54

%S 0,1,2,4,5,6,8,10,40,46,60,61,64,80,84,5000

%N Nonnegative integers that when written out in full in English have no repeated letter.

%C If negative numbers are allowed then there are two more terms, namely -40 and -2. - _Paul Duckett_, Jun 05 2022

%D GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 70.

%H Jeff Miller, <a href="https://jeff560.tripod.com/words15.html">A Collection of Word Oddities and Trivia</a>

%o (Python)

%o from num2words import num2words as n2w

%o def letters(n):

%o return "".join(c for c in n2w(n).replace(" and", "") if c.isalpha())

%o def ok(n):

%o w = letters(n)

%o return len(w) == len(set(w))

%o print([k for k in range(5001) if ok(k)]) # _Michael S. Branicky_, May 04 2022

%K fini,full,nonn,word

%O 1,3

%A _Rodolfo Kurchan_, Mar 11 2001

%E More terms from George Russell (ger(AT)tzi.de), Nov 10 2004

%E Edited by _N. J. A. Sloane_, May 29 2006