login
A169936
Numbers whose name in English is an anagram of the name of another number.
1
67, 69, 76, 79, 96, 97, 102, 103, 104, 105, 106, 107, 108, 109, 112, 122, 123, 124, 125, 126, 127, 128, 129, 132, 133, 134, 135, 136, 137, 138, 139, 142, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 155, 156, 157, 158, 159, 162, 163, 164
OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..680, all terms < 1000.
Roel and Bas van Dijk, Numerals package, Hackage (Haskell packages).
Wikipedia, Anagram
EXAMPLE
SIXTY-SEVEN <-> SEVENTY-SIX
SIXTY-NINE <-> NINETY-SIX
SEVENTY-SIX <-> SIXTY-SEVEN
NINETY-SIX <-> SIXTY-NINE
ONE HUNDRED TWO <-> TWO HUNDRED ONE
ONE HUNDRED THREE <-> THREE HUNDRED ONE
...
ONE HUNDRED TWELVE <-> TWO HUNDRED ELEVEN
...
SIX HUNDRED SEVENTY-NINE <-> SIX HUNDRED NINETY-SEVEN <-> SEVEN HUNDRED SIXTY-NINE <-> SEVEN HUNDRED NINETY-SIX <-> NINE HUNDRED SIXTY-SEVEN <-> NINE HUNDRED SEVENTY-SIX
PROG
(Haskell)
import Data.Map (empty, insertWith, elems)
import Data.Text (unpack); import Data.Maybe (fromJust)
import Data.List (sort)
import Text.Numeral.Grammar.Reified (defaultInflection)
import qualified Text.Numeral.Language.EN as EN -- see link
a169936 n = a169936_list !! (n-1)
a169936_list = sort $ concat $ filter ((> 1) . length) $
elems $ fill [1..999] empty where
fill [] m = m
fill (z:zs) m = fill zs $ insertWith (++) (sort $ engl z) [z] m
engl :: Integer -> String
engl = unpack . fromJust . EN.us_cardinal defaultInflection
-- Reinhard Zumkeller, Feb 18 2015
(Python)
from num2words import num2words
def alst(ALLBELOW=1000):
out, ana = set(), dict()
for i in range(ALLBELOW):
key = "".join(sorted(num2words(i)))
if key in ana: out.update([ana[key], i])
else: ana[key] = i
return sorted(out)
print(alst()) # Michael S. Branicky, Dec 14 2020
CROSSREFS
Sequence in context: A145175 A196251 A246783 * A045808 A073523 A295803
KEYWORD
nonn,word,nice
AUTHOR
Eric Angelini, Jul 21 2010
EXTENSIONS
Terms 102 through 112 from Andrew Weimholt, Jul 21 2010
Terms beyond 112 from Sean A. Irvine, Jul 22 2010
STATUS
approved