%I #36 Jul 30 2023 05:04:17
%S 0,1,4,5,6,7,9,11,100,101,104,105,106,107,109,111,400,401,404,405,406,
%T 407,409,411,500,501,504,505,506,507,509,511,600,601,604,605,606,607,
%U 609,611,700,701,704,705,706,707,709,711,900,901,904,905,906,907,909,911,1000000,1000001,1000004,1000005
%N Numbers that do not contain the letter 't'.
%C See also A006933, the eban numbers (numbers not containing 'e'), and A089589 (the iban numbers). This sequence might correspondingly be called the "tban" numbers. - _WG Zeist_, Aug 31 2012
%H Reinhard Zumkeller, <a href="/A008523/b008523.txt">Table of n, a(n) for n = 1..1000</a>
%H Roel and Bas van Dijk, <a href="http://hackage.haskell.org/package/numerals">Numerals package</a>, Hackage (Haskell packages)
%H <a href="/index/Lc#letters">Index entries for sequences related to number of letters in n</a>
%o (Haskell)
%o -- import Data.Maybe (fromJust)
%o import Data.Text (Text); import qualified Data.Text as T (all)
%o import Text.Numeral.Grammar.Reified (defaultInflection)
%o import qualified Text.Numeral.Language.EN as EN -- see link
%o a008523 n = a008523_list !! (n-1)
%o a008523_list = filter (T.all (/= 't') . numeral) [0..] where
%o numeral :: Integer -> Text
%o numeral = fromJust . EN.gb_cardinal defaultInflection
%o -- _Reinhard Zumkeller_, Jan 23 2015
%o (Python)
%o from num2words import num2words
%o from itertools import islice, product
%o def ok(n): return "t" not in num2words(n)
%o def agen(): # generator of terms < 10**304
%o base, pows = [k for k in range(1, 1000) if ok(k)], [1]
%o yield from ([0] if ok(0) else []) + base
%o for e in range(3, 304, 3):
%o if "u" not in num2words(10**e)[4:]:
%o pows = [10**e] + pows
%o for t in product([0] + base, repeat=len(pows)):
%o if t[0] == 0: continue
%o yield sum(t[i]*pows[i] for i in range(len(t)))
%o print(list(islice(agen(), 60))) # _Michael S. Branicky_, Aug 19 2022
%Y Cf. A006933 (ban e), A089589 (ban i), A008521 (ban o), A089590 (ban u).
%Y Complement of A008522.
%K nonn,word
%O 1,3
%A _N. J. A. Sloane_
%E a(57)-a(60) from _WG Zeist_, Aug 31 2012
|