cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072957 Urban numbers: without 'r' or 'u'.

This page as a plain text file.
%I A072957 #14 Aug 19 2022 13:52:34
%S A072957 1,2,5,6,7,8,9,10,11,12,15,16,17,18,19,20,21,22,25,26,27,28,29,50,51,
%T A072957 52,55,56,57,58,59,60,61,62,65,66,67,68,69,70,71,72,75,76,77,78,79,80,
%U A072957 81,82,85,86,87,88,89,90,91,92,95,96,97,98,99,1000000,1000001,1000002
%N A072957 Urban numbers: without 'r' or 'u'.
%D A072957 M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002).
%H A072957 Michael S. Branicky, <a href="/A072957/b072957.txt">Table of n, a(n) for n = 1..10000</a>
%o A072957 (PARI) is(n)=!setintersect(Set(Vec(English(n))),["r","u"]) \\ See A052360 for English(). - _M. F. Hasler_, Apr 01 2019
%o A072957 /* Alternate code, not using English(): (valid for 1 <= n < one trillion, which should be forbidden due to the 'r' but returns 1) */
%o A072957 is(n)={setintersect( Set(digits(n)), [3,4]) && return; !while(n=divrem(n,10^6), n[2]<100||return; n=n[1])} \\ _M. F. Hasler_, Apr 01 2019
%o A072957 (Python)
%o A072957 from num2words import num2words
%o A072957 from itertools import islice, product
%o A072957 def ok(n): return set(num2words(n)) & {"r", "u"} == set()
%o A072957 def agen(): # generator of terms < 10**304
%o A072957     base, pows = [k for k in range(1, 1000) if ok(k)], [1]
%o A072957     yield from ([0] if ok(0) else []) + base
%o A072957     for e in range(3, 304, 3):
%o A072957         if set(num2words(10**e)[4:]) & {"r", "u"} == set():
%o A072957             pows = [10**e] + pows
%o A072957             for t in product([0] + base, repeat=len(pows)):
%o A072957                 if t[0] == 0: continue
%o A072957                 yield sum(t[i]*pows[i] for i in range(len(t)))
%o A072957 print(list(islice(agen(), 66))) # _Michael S. Branicky_, Aug 19 2022
%Y A072957 Cf. A006933 (eban numbers: without 'e'), A008521 (without 'o'), A008523 (without 't'), A008537 (without 'n'), A089590 (without 'u'), A072956 (turban numbers: without r, t or u), A089589 (without 'i').
%K A072957 easy,nonn,word
%O A072957 1,2
%A A072957 _Michael Joseph Halm_, Aug 13 2002
%E A072957 Missing term 52 inserted by _Michael S. Branicky_, Aug 19 2022