login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134629 Least nonnegative integer which requires n letters to spell in English, excluding spaces and hyphens. A right inverse of A005589. 8
1, 0, 3, 11, 15, 13, 17, 24, 23, 73, 101, 104, 103, 111, 115, 113, 117, 124, 123, 173, 323, 373, 1104, 1103, 1111, 1115, 1113, 1117, 1124, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 23323, 23373, 73373, 101373, 103323, 103373, 111373, 113323, 113373, 117373, 123323, 123373 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,3
COMMENTS
Variant of A080777. - R. J. Mathar, Dec 13 2008
This is one of many possible right inverses of A005589, i.e., A005589 o A134629 = id (of course on the domain of this sequence, [3 .. oo)). It does not satisfy A134629 o A005589 = id. - M. F. Hasler, Feb 25 2018
LINKS
Michael S. Branicky, Table of n, a(n) for n = 3..608 (terms < 10^54)
Landon Curt Noll, The English Name of a Number.
Eric Weisstein's World of Mathematics, Number.
EXAMPLE
a(3) = 1: "one", a(4) = 0: "zero", a(5) = 3: "three", a(6) = 11: "eleven", a(7) = 15: "fifteen", etc.
MATHEMATICA
(* first load Hans Havermann's text file a001477.txt and then *)
f[n_] := Length@ Characters@ ToString@ lst[[n]]; g[n_] := Block[{k = 1}, While[ f[k] != n, k++]; k]; Array[g, 41, 3] - 1 (* Robert G. Wilson v, May 26 2013 *)
f[n_] := Length@ StringPartition[ StringReplace[ IntegerName[n, "Words"], ", " | " " | "\[Hyphen]" -> ""], 1] (* after Giovanni Resta in A005589 *); t[_] := 0; k = 1; While[k < 174000, a = f@k; If[t[a] == 0, t[a] = k]; k++]; t[4] = 0 (* only {0, 4, 5 & 9} have just four letters *); t@# & /@ Range[3, 54] (* Robert G. Wilson v, May 25 2018 *)
PROG
(PARI) A134629(n)=for(k=1, oo, A005589(k)==n&&return(k)) \\ M. F. Hasler, Feb 25 2018
(Python)
from num2words import num2words as n2w
from itertools import count, islice
def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())
def agen(): # generator of terms
adict, n = dict(), 3
for k in count(0):
v = f(k)
if v not in adict: adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 40))) # Michael S. Branicky, Feb 19 2023
CROSSREFS
Sequence in context: A288980 A235913 A132363 * A245522 A358226 A030715
KEYWORD
nonn,word
AUTHOR
Robert G. Wilson v, Nov 04 2007
EXTENSIONS
More terms and reworded name from M. F. Hasler, Feb 25 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 02:49 EDT 2024. Contains 371798 sequences. (Running on oeis4.)