login
Turban numbers: without letters r, t, or u.
6

%I #13 Aug 19 2022 13:51:47

%S 1,5,6,7,9,11,1000000,1000001,1000005,1000006,1000007,1000009,1000011,

%T 5000000,5000001,5000005,5000006,5000007,5000009,5000011,6000000,

%U 6000001,6000005,6000006,6000007,6000009,6000011,7000000,7000001,7000005,7000006,7000007,7000009

%N Turban numbers: without letters r, t, or u.

%D M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002).

%H Michael S. Branicky, <a href="/A072956/b072956.txt">Table of n, a(n) for n = 1..10000</a>

%o (PARI) is(n)=!setintersect(Set(Vec(English(n))),["r","t","u"]) \\ See A052360 for English(). - _M. F. Hasler_, Apr 01 2019

%o (Python)

%o from num2words import num2words

%o from itertools import islice, product

%o def ok(n): return set(num2words(n)) & {"r", "t", "u"} == set()

%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 set(num2words(10**e)[4:]) & {"r", "t", "u"} == set():

%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(), 66))) # _Michael S. Branicky_, Aug 19 2022

%Y Cf. A006933 (eban numbers: without 'e'), A008521 (without 'o'), A008523 (without 't'), A008537 (without 'n'), A089590 (without 'u'), A072957 (urban numbers: without r or u), A089589 (without 'i').

%K easy,nonn,word

%O 1,2

%A _Michael Joseph Halm_, Aug 13 2002