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.

A089590 Uban numbers (the letter u is banned from the English name of the number).

This page as a plain text file.
%I A089590 #22 Feb 16 2025 08:32:51
%S A089590 0,1,2,3,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,25,26,27,28,
%T A089590 29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,
%U A089590 55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,75,76,77,78,79,80,81,82,83,85,86,87,88,89,90,91,92,93,95,96,97,98,99
%N A089590 Uban numbers (the letter u is banned from the English name of the number).
%C A089590 The sequence of uban numbers first differs from A052406 (the numbers not containing the digit 4) at the term 40 (forty), which is a uban number but is not 4-less.
%H A089590 Daniel Arribas and Reinhard Zumkeller, <a href="/A089590/b089590.txt">Table of n, a(n) for n = 1..1000</a> (first 89 terms from Daniel Arribas)
%H A089590 Roel and Bas van Dijk, <a href="http://hackage.haskell.org/package/numerals">Numerals package</a>, Hackage (Haskell packages)
%H A089590 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UbanNumber.html">Uban Number</a>
%H A089590 <a href="/index/Lc#letters">Index entries for sequences related to number of letters in n</a>
%o A089590 (Haskell)
%o A089590 import Data.Maybe (fromJust)
%o A089590 import Data.Text (Text); import qualified Data.Text as T (all)
%o A089590 import Text.Numeral.Grammar.Reified (defaultInflection)
%o A089590 import qualified Text.Numeral.Language.EN as EN  -- see link
%o A089590 a089590 n = a089590_list !! (n-1)
%o A089590 a089590_list = filter (T.all (/= 'u') . numeral) [0..] where
%o A089590    numeral :: Integer -> Text
%o A089590    numeral = fromJust . EN.gb_cardinal defaultInflection
%o A089590 -- _Reinhard Zumkeller_, Jan 23 2015
%o A089590 (Python)
%o A089590 from num2words import num2words
%o A089590 from itertools import islice, product
%o A089590 def ok(n): return "u" not in num2words(n)
%o A089590 def agen(): # generator of terms < 10**304
%o A089590     base, pows = [k for k in range(1, 1000) if ok(k)], [1]
%o A089590     yield from ([0] if ok(0) else []) + base
%o A089590     for e in range(3, 304, 3):
%o A089590         if "u" not in num2words(10**e)[4:]:
%o A089590             pows = [10**e] + pows
%o A089590             for t in product([0] + base, repeat=len(pows)):
%o A089590                 if t[0] == 0: continue
%o A089590                 yield sum(t[i]*pows[i] for i in range(len(t)))
%o A089590 print(list(islice(agen(), 100))) # _Michael S. Branicky_, Aug 19 2022
%Y A089590 Cf. A052406.
%Y A089590 Cf. A006933 (ban e), A089589 (ban i), A008521 (ban o), A008523 (ban t).
%K A089590 nonn,easy,word
%O A089590 1,3
%A A089590 _Eric W. Weisstein_, Nov 09 2003
%E A089590 a(1) = 0 prepended by _Reinhard Zumkeller_, Jan 23 2015