A008523 Numbers that do not contain the letter 't'.
0, 1, 4, 5, 6, 7, 9, 11, 100, 101, 104, 105, 106, 107, 109, 111, 400, 401, 404, 405, 406, 407, 409, 411, 500, 501, 504, 505, 506, 507, 509, 511, 600, 601, 604, 605, 606, 607, 609, 611, 700, 701, 704, 705, 706, 707, 709, 711, 900, 901, 904, 905, 906, 907, 909, 911, 1000000, 1000001, 1000004, 1000005
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
- Roel and Bas van Dijk, Numerals package, Hackage (Haskell packages)
- Index entries for sequences related to number of letters in n
Crossrefs
Programs
-
Haskell
-- import Data.Maybe (fromJust) import Data.Text (Text); import qualified Data.Text as T (all) import Text.Numeral.Grammar.Reified (defaultInflection) import qualified Text.Numeral.Language.EN as EN -- see link a008523 n = a008523_list !! (n-1) a008523_list = filter (T.all (/= 't') . numeral) [0..] where numeral :: Integer -> Text numeral = fromJust . EN.gb_cardinal defaultInflection -- Reinhard Zumkeller, Jan 23 2015
-
Python
from num2words import num2words from itertools import islice, product def ok(n): return "t" not in num2words(n) def agen(): # generator of terms < 10**304 base, pows = [k for k in range(1, 1000) if ok(k)], [1] yield from ([0] if ok(0) else []) + base for e in range(3, 304, 3): if "u" not in num2words(10**e)[4:]: pows = [10**e] + pows for t in product([0] + base, repeat=len(pows)): if t[0] == 0: continue yield sum(t[i]*pows[i] for i in range(len(t))) print(list(islice(agen(), 60))) # Michael S. Branicky, Aug 19 2022
Extensions
a(57)-a(60) from WG Zeist, Aug 31 2012
Comments