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
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