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.

Showing 1-10 of 37 results. Next

A052362 Indices of records in length of English name of n including spaces and dashes (A052360): n such that k < n => A052360(k) < A052360(n).

Original entry on oeis.org

0, 3, 11, 13, 17, 21, 23, 73, 101, 103, 111, 113, 117, 121, 123, 173, 323, 373, 1101, 1103, 1111, 1113, 1117, 1121, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 21373, 23323, 23373, 73373, 101323, 101373, 103323, 103373, 111373, 113323, 113373, 117373
Offset: 1

Views

Author

Allan C. Wechsler, Mar 07 2000

Keywords

Comments

From M. F. Hasler, Aug 12 2020: (Start)
This sequence uses A052360 which counts all characters in the English name of the numbers, including spaces and hyphens, in contrast to A052363 which uses A005589 which only counts the letters. Thus, e.g., "twenty-one" is in this sequence but not in A052363.
It appears that from 1323 on, all terms end in -323 or in -373. After 117(373) these are prefixed by 121, 123, 173, 323, 373 (thousand). Then the next terms is 1'103'323, and after 1'373'373, the next terms are > 3*10^6, then > 11*10^6, etc.
I conjecture that from 103 on all d-digit terms have a smaller (most often but not always (d-1)-digit) term as suffix, and from 173 on they also have an earlier term as prefix. (End)

Examples

			From _M. F. Hasler_, Aug 12 2020: (Start)
The first term is zero, since all other nonnegative integers (thus certainly all those with longer names) are larger than zero.
"One" and "two" are not in the sequence, since "zero" is smaller but has a longer name.
"Three" is again in the sequence since all smaller numbers (0, 1 and 2) have shorter names. And so on. (End)
		

Crossrefs

Programs

  • PARI
    m=0;for(n=0,2e5, if(m<A052360(n), m=A052360(n); print1(n", "))) \\ M. F. Hasler, Aug 12 2020
    
  • Python
    from itertools import count, islice
    from num2words import num2words as n2w
    def f(n): return len(n2w(n).replace(" and", "").replace(chr(44), ""))
    def agen():
        record = 0
        for n in count(0):
            value = f(n)
            if value > record: yield n; record = value
    print(list(islice(agen(), 46))) # Michael S. Branicky, Jul 12 2022

Extensions

Minor edits by Ray Chandler, Jul 22 2009
Name and example edited and more terms by M. F. Hasler, Aug 12 2020

A132363 Least natural number in English which requires exactly n characters to spell including spaces and hyphens, or 0 if no such number exists. The inverse of A052360.

Original entry on oeis.org

1, 0, 3, 11, 15, 13, 17, 21, 24, 23, 73, 3000, 101, 104, 103, 111, 115, 113, 117, 121, 124, 123, 173, 323, 373, 1101, 1104, 1103, 1111, 1115, 1113, 1117, 1121, 1124, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 21373, 23323, 23373, 73373
Offset: 3

Views

Author

Jonathan Vos Post, Nov 08 2007

Keywords

Comments

This is to A052360 as A134629 is to A005589. Also assumes no 'and' is used to spell integers. This deviates from A134629 at a(10). "twenty-one" is the smallest integer whose standard English name has a hyphen. "one hundred" is the smallest integer whose standard English name has a space. "one hundred twenty-one" is the smallest integer whose standard English name has a space and a hyphen.

Examples

			a(3) = 1 because "one" has 3 characters.
a(4) = 0 because "zero" has 4 characters.
a(5) = 3 because "three" has 5 characters.
a(6) = 11 because "eleven" has 6 characters.
a(7) = 15 because "fifteen" has 7 characters.
a(8) = 13 because "thirteen" has 8 characters.
a(9) = 17 because "seventeen" has 9 characters.
a(10) = 21 because "twenty-one" has 10 characters.
a(11) = 24 because "twenty-four" has 11 characters.
a(12) = 23 because "twenty-three" has 12 characters.
a(13) = 73 because "seventy-three" has 13 characters.
a(14) = 3000 because "three thousand" has 14 characters.
		

Crossrefs

Extensions

Corrected and extended by Martin Fuller, Nov 24 2007

A005589 Number of letters in the US English name of n, excluding spaces and hyphens.

Original entry on oeis.org

4, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 5, 8, 8, 10, 9, 9, 8, 10, 10, 9, 7, 10, 10, 12, 11, 11, 10, 12, 12, 11, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 6, 9, 9, 11, 10, 10, 9, 11, 11, 10, 10, 13, 13, 15, 14, 14, 13, 15, 15, 14, 13, 16, 16, 18, 18, 17, 17, 19, 18, 18, 16
Offset: 0

Views

Author

Keywords

Comments

Diane Karloff observes (Nov 27 2007) that repeatedly applying the map k->A005589(k) to any starting value n always leads to 4 (cf. A016037, A133418).
The above observation was previously made in 1972 by R. Schroeppel and R. W. Gosper in HAKMEM (Item 134). - Bartlomiej Pawlik, Jun 12 2023
For terms beyond a(100), this sequence uses the US English style, "one hundred one" (not "one hundred and one"), and the short scale (a billion = 10^9, not 10^12). - M. F. Hasler, Nov 03 2013
Explanation of Diane Karloff's observation above: In many languages there exists a number N, after which all numbers are written with fewer letters than the number itself. N is 4 in English, German and Bulgarian, and 11 in Russian. If in the interval [1,N] there are numbers equal to the number of their letters, then they are attractors. In English and German the only attractor is 4, in Bulgarian 3, in Russian there are two, 3 and 11. In the interval [1,N] there may also exist loops of numbers, for instance 4 and 6 in Bulgarian (6 and 4 letters respectively) or 4,5 and 6 in Russian (6,4 and 5 letters respectively). There are no loops in English, therefore the above observation is true. - Ivan N. Ianakiev, Sep 20 2014

Examples

			Note that A052360(373373) = 64 whereas a(373373) = 56.
		

References

  • Problems Drive, Eureka, 37 (1974), 8-11 and 33.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A362123 for another version.
Cf. A007208 (analog for German).

Programs

  • Mathematica
    inWords[n_] := Module[{r,
    numNames = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"},
    teenNames = {"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"},
    tensNames = {"", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"},
    decimals = {"", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quindecillion", "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", "vigintillion", "unvigintillion", "duovigintillion", "trevigintillion", "quattuorvigintillion", "quinvigintillion", "sexvigintillion", "septenvigintillion", "octovigintillion", "novemvigintillion", "trigintillion", "untrigintillion", "duotrigintillion"}},
    r = If[# != 0, numNames[[# + 1]] <> "hundred"
    (* <> If[#2 != 0||#3 != 0," and",""] *),
    ""] <> Switch[#2, 0, numNames[[#3 + 1]], 1, teenNames[[#3 + 1]], _, tensNames[[#2 + 1]] <> numNames[[#3 + 1]]] & @@@
    (PadLeft[ FromDigits /@ Characters@ StringReverse@#, 3] & /@ StringCases[ StringReverse@ IntegerString@ n, RegularExpression["\\d{1,3}"]]);
    StringJoin@ Reverse@ MapThread[ If[# != "", StringJoin[##], ""] &, {r, Take[decimals, Length@ r]} ]]; (* modified for this sequence from what is presented in the link and good to 10^102 -1 *)
    f[n_] := StringLength@ inWords@ n; f[0] = 4; Array[f, 84, 0]
    (* Robert G. Wilson v, Nov 04 2007 and revised Mar 31 2015, small revision by Ivan Panchenko, Nov 10 2019 *)
    a[n_] := StringLength[ StringReplace[ IntegerName[n, "Words"], "," | " " | "\[Hyphen]" -> ""]]; a /@ Range[0, 83] (* Mma version >= 10, Giovanni Resta, Apr 10 2017 *)
  • PARI
    A005589(n, t=[10^12, #"trillion", 10^9, #"billion", 10^6, #"million", 1000, #"thousand", 100, #"hundred"])={ n>99 && forstep( i=1, #t, 2, n999 && error("n >= 10^",valuation(t[1],10)+3," requires extended 2nd argument"); return( A005589(n[1])+t[i+1]+if( n[2], A005589( n[2] )))); if( n<20, #(["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"][n+1]), #([ "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" ][n\10-1])+if( n%10, A005589(n%10)))}  \\ Extension of 2nd arg to larger numbers is easy using the names listed in Mathematica section above. Only the string lengths are required, so it's easy to extend this list further without additional knowledge and without writing out the names. - M. F. Hasler, Jul 26 2011, minor edit on Jun 15 2021
    
  • Python
    from num2words import num2words
    def a(n):
        x = num2words(n).replace(' and ', '')
        l = [chr(i) for i in range(97, 123)]
        return sum(1 for i in x if i in l)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 05 2017

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Allan C. Wechsler, Mar 20 2000
Erroneous b-file deleted by N. J. A. Sloane, Sep 25 2008
More than the usual number of terms are shown in the DATA field to avoid confusion with A362123. - N. J. A. Sloane, Apr 20 2023

A006933 'Eban' numbers (the letter 'e' is banned!).

Original entry on oeis.org

2, 4, 6, 30, 32, 34, 36, 40, 42, 44, 46, 50, 52, 54, 56, 60, 62, 64, 66, 2000, 2002, 2004, 2006, 2030, 2032, 2034, 2036, 2040, 2042, 2044, 2046, 2050, 2052, 2054, 2056, 2060, 2062, 2064, 2066, 4000, 4002, 4004, 4006, 4030, 4032, 4034, 4036, 4040, 4042, 4044, 4046, 4050, 4052, 4054, 4056, 4060, 4062, 4064, 4066, 6000
Offset: 1

Views

Author

Keywords

Comments

Invented by N. J. A. Sloane circa 1990.
Theorem (N. J. A. Sloane): in English every odd number contains an 'e'.
The first number that would appear in the British Eban list but not the American list is 2*10^21. - Douglas Boffey, Jun 21 2012
A085513(a(n)) = 0. - Reinhard Zumkeller, Jan 23 2015

Examples

			2052 is in the sequence because written out in English words, "two thousand fifty-two", it does not contain a single instance of the letter E.
2053 (two thousand fifty-three) is not in the sequence because written out it contains two instances of E.
		

References

  • J. C. Hernandez et al., "Characterization of Eban numbers", pp. 197-200, Journal of Recreational Mathematics, 31 (3) 2002-2003.
  • Georges Perec, La disparition, Editions Gallimard, Paris, 1969; English translation: A Void, Harvill, 1994. (A novel that does not use the letter "e".)
  • Georges Perec, Les Revenentes [a novel in which the only vowel that appears is 'e']. - From Simon Plouffe, Mar 12 2010
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A082504.
Cf. A085513, A008520 (complement), A008521 (ban o), A008523 (ban t), A089589 (ban i), A089590 (ban u), A014254 (a French version), A287876 (a Hebrew version).
Cf. A008537 (without 'n'), A072956 (turban numbers: without r, t or u), A072957 (urban numbers: without r or u), A089589 (without 'i').

Programs

  • Haskell
    import Data.Maybe (fromJust)
    import Data.Text (Text); import qualified Data.Text as T (unpack)
    import Text.Numeral.Grammar.Reified (defaultInflection)
    import qualified Text.Numeral.Language.EN as EN  -- see link
    a006933 n = a006933_list !! (n-1)
    a006933_list = filter (T.all (/= 'e') . numeral) [0..] where
       numeral :: Integer -> Text
       numeral = fromJust . EN.gb_cardinal defaultInflection
    -- Reinhard Zumkeller, Jan 23 2015
    
  • Magma
    [ n : n in [1..100] | forall{ i : i in [1..#seq] | seq[i] in eban[(i-1)mod 3+1]} where seq is Intseq(n) ] where eban is [[0,2,4,6],[0,3,4,5,6],[0]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • PARI
    is(n)=!setsearch(Set(Vec(English(n))), "e") \\ See A052360 for English(). - M. F. Hasler, Apr 01 2019
  • Python
    from num2words import num2words
    [n for n in range(6001) if 'e' not in num2words(n)] # Indranil Ghosh, Jul 05 2017
    

Extensions

More terms from WG Zeist, Aug 28 2012
More cross-references from M. F. Hasler, Apr 01 2019

A073327 Write U.S. English name for n (ignoring hyphens and spaces) and add numerical values of letters using a=1, b=2, ..., y=25, z=26.

Original entry on oeis.org

64, 34, 58, 56, 60, 42, 52, 65, 49, 42, 39, 63, 87, 99, 104, 65, 96, 109, 73, 86, 107, 141, 165, 163, 167, 149, 159, 172, 156, 149, 100, 134, 158, 156, 160, 142, 152, 165, 149, 142, 84, 118, 142, 140, 144, 126, 136, 149, 133, 126, 66, 100, 124, 122, 126, 108, 118
Offset: 0

Views

Author

Paul Lusch, Aug 22 2002

Keywords

Comments

In writing out the names for these numbers, "and" is not used in U.S. English; e.g., 101 is rendered as "one hundred one" rather than "one hundred and one". - Robert Israel, Jun 12 2019
The British English version is too similar to this to have its own entry. They first differ at n=101, where here a(101) = 142, whereas in British English 101 is "one hundred and one", which is 161. - N. J. A. Sloane, Jun 09 2021
From Robert Israel's data it appears that the U.S. version has no fixed points, and the British version has exactly two fixed points, at 251 and 259. I do not know if either version has cycles of length >= 2 apart from the cycles of length 5 that are visible in A345126 and A345157. - N. J. A. Sloane, Jun 11 2021

Examples

			"One" = 15 + 14 + 5 = 34 (o is 15th letter, n is 14th letter, e is 5th letter).
From _Omar E. Pol_, Jun 15 2021: (Start)
-----------------------------------------------------
   n      Name      Calculation                  a(n)
-----------------------------------------------------
   0      Zero      26 +  5 + 18 + 15           = 64
   1      One       15 + 14 +  5                = 34
   2      Two       20 + 23 + 15                = 58
   3      Three     20 +  8 + 18 +  5 +  5      = 56
   4      Four       6 + 15 + 21 + 18           = 60
   5      Five       6 +  9 + 22 +  5           = 42
   6      Six       19 +  9 + 24                = 52
   7      Seven     19 +  5 + 22 +  5 + 14      = 65
   8      Eight      5 +  9 +  7 +  8 + 20      = 49
   9      Nine      14 +  9 + 14 +  5           = 42
  10      Ten       20 +  5 + 14                = 39
  11      Eleven     5 + 12 +  5 + 22 +  5 + 14 = 63
  12      Twelve    20 + 23 +  5 + 12 + 22 +  5 = 87
... (End)
		

Crossrefs

Row sums of A073029.
For analogs in other languages see A169639 (French), A119945 (German), A161406 (Spanish).

Programs

  • Maple
    # Maple program for US English
    f:= proc(n) local S;
       uses StringTools;
      S:= Select(IsAlpha,convert(n,english));
      convert(map(`-`,convert(S,bytes),96),`+`)
    end proc:
    map(f, [$0..100]); # Robert Israel, Jun 12 2019
    # British English version, valid for n < 10^9
    f:= proc(n) local S;
       uses StringTools;
      S:= Select(IsAlpha, convert(n, english, And));
      convert(map(`-`, convert(S, bytes), 96), `+`)
    end proc:
    map(f, [$0..200]); # Robert Israel, Jun 11 2021
  • Mathematica
    a[n_] := Total@ Flatten[ ToCharacterCode@# - 96 & /@ Characters@ StringDelete[IntegerName@ n, Except@ LetterCharacter]] (* after Michael De Vlieger in A362065 *); Array[a, 57, 0] (* Robert G. Wilson v, Apr 19 2023 *)
  • PARI
    A073327(n)=sum(i=1,#n=select(t->t>64,Vec(Vecsmall(English(n)))),n[i]%32) \\ see A052360 for English(). - M. F. Hasler, Jun 22 2013
    
  • Python
    import re
    from num2words import num2words
    # US English
    def A073327(n): return sum(ord(d)-96 for d in re.sub(r"\sand\s|[^a-z]", "", num2words(n)))
    # British English
    def A073327(n): return sum(ord(d)-96 for d in re.sub("[^a-z]", "", num2words(n, lang='en_GB'))) # Chai Wah Wu, Jun 13 2021

Extensions

a(0) added by N. J. A. Sloane, Jun 30 2008
More terms from Jon E. Schoenfield, Aug 30 2009

A075774 Number of syllables in n in American English.

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 4, 4, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 2, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 4
Offset: 0

Views

Author

Ethan B. Trewhitt, Oct 09 2002

Keywords

Comments

Uses the convention of omitting a trailing 'and', so 101 is 'one hundred one' rather than 'one hundred and one.' - Eric W. Weisstein, May 11 2006
From Michael S. Branicky, May 28 2024: (Start)
The only numbers with a(n) = 1 are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12.
The only numbers with a(n) = 2 are 7, 13, 14, 15, 16, 18, 19, 20, 30, 40, 50, 60, 80, 90.
Those with a(n) = 3 and 4 are in A372807 and A180961, respectively. (End)

Examples

			a(76)=4 because seventy-six is split sev.en.ty.six, or four syllables.
		

Crossrefs

Programs

  • PARI
    A075774(n, t=[10^9, 2, 10^6, 2, 1000, 2, 100, 2])={ n>99 && forstep( i=1, #t, 2, nA075774(n[1])+t[i+1]+if( n[2], A075774( n[2] )))); if( n<20, 1+!!setsearch(Set([0,7,13,14,15,16,18,19]),n) + 2*!!setsearch(Set([11,17]),n), 2+(n\10==7) + if(n%10, A075774(n%10)))}  \\ The "Set()" is not required in PARI v.2.6+ but we put it for downward compatibility. - M. F. Hasler, Nov 03 2013
    
  • Python
    def A075774(n):
        t = [(10**i, 2) for i in [12, 9, 6, 3, 2]]
        if n > 99:
            for ti, sti in t:
                if n >= ti:
                    q, r = divmod(n, ti)
                    return A075774(q) + sti + (A075774(r) if r else 0)
        if n < 20:
            return 1 + (n in {0, 7, 13, 14, 15, 16, 18, 19}) + 2*(n in {11, 17})
        else: return 2 + (n//10==7) + (A075774(n%10) if n%10 else 0)
    print([A075774(n) for n in range(105)]) # Michael S. Branicky, Jun 27 2021 after M. F. Hasler

Extensions

More terms from Eric W. Weisstein, May 11 2006

A007208 Number of letters in German name of n.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 5, 6, 4, 4, 4, 3, 5, 8, 8, 8, 8, 8, 8, 8, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7
Offset: 0

Views

Author

Keywords

Comments

Standard German orthography; a letter with an umlaut or ß is counted as a single letter: e.g., 30 maps to length("dreißig") = 7.
There are ambiguities from n=100 on, since both, "hundert" and "einhundert" are equally valid and common. The same applies for 1000 with "tausend" or "eintausend". - M. F. Hasler, Nov 03 2013
In contrast to English (A005589 vs A052360) and French (A007005 vs A167507), there are no spaces or other punctuation in German names for numbers, until 10^6 = "eine Million". - M. F. Hasler, Sep 20 2014
There also appears to be an ambiguity on whether there is an 's' in the middle of 101*10^3, "(ein)hundertein(s)tausend". - M. F. Hasler, Apr 08 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005589 and A052360 (English analog).
Cf. A007005 and A167507 (French analog).

Programs

  • PARI
    /* Because names with ä, ö, ü or ß can't be entered directly as a string in the GP interface, we use a separate list for the names, for efficiency and readability of the main function. Note that the default lexicographical order is that of ISO 8859-1 character codes ("z" < "ß" < "ä"). In applications where this is not suitable, the special characters below can be replaced, e.g., with "ae, oe, ue, ss" or "a, o, u, s". [M. F. Hasler, Jul 05 2024] */
    {deutsch = ["eins", "zwei", "drei", "vier", Str("f"Strchr(252)"nf"), "sechs", "sieben", "acht", "neun", "zehn", "elf", Str("zw"Strchr(246)"lf"),  "dreizehn", "vierzehn", Str("f"Strchr(252)"nfzehn"), "sechzehn", "siebzehn", "achtzehn", "neunzehn", "zwanzig", Str("drei"Strchr(223)"ig"), "vierzig", Str("f"Strchr(252)"nfzig"), "sechzig", "siebzig", "achtzig", "neunzig"]}
    German(n, e="eins", power=0, name="")={ if(power /* internal helper function */
      , n = divrem(n, power); Str(German(n[1], e) name, if(n[2], German(n[2]), ""))
      , n < 20, if(n>1, deutsch[n], n, e, "null")
      , n < 100, Str(if(n%10, Str(German(n%10, "ein") "und"), "") deutsch[n\10+18])
      , n < 1000, German(n, "ein", 100, "hundert") \\ replace "ein" with "" to get
      , n < 10^6, German(n, "ein", 1000, "tausend")\\ hundert/tausend without "ein-"
      , my(t=3); while(n>=10^t, t+=3); German(n, "ein", 10^t-=3, strprintf(
          if(n\10^t>1, " %sen", t%2, "e %se", "e %s")  if(n%10^t, " ", ""),
          Str(["M", "B", "Tr", "Quadr", "Quint", "Sext", "Sept", "Oct", "Non",
               "Dez", "Undez" /* etc. */][t\6], "illi", ["on", "ard"][t%2+1])))
      )} \\ updated Mar 03 2020, Apr 08 2023, Jul 05 2024
    A007208 = n -> #German(n) \\ M. F. Hasler, Nov 01 2013
    A007208(n) = vecsum([c>32|c<-Vecsmall(German(n))]) \\ To exclude spaces; irrelevant for n < 10^6. - M. F. Hasler, Jul 05 2024

Extensions

Corrected by Markus Stausberg (markus(AT)polomi.de), Aug 08 2004
Initial term a(0) = 4 = #"null" added by M. F. Hasler, Nov 01 2013

A052363 Numbers n whose English name has a greater length (A005589) than any smaller number.

Original entry on oeis.org

0, 3, 11, 13, 17, 23, 73, 101, 103, 111, 113, 117, 123, 173, 323, 373, 1103, 1111, 1113, 1117, 1123, 1173, 1323, 1373, 3323, 3373, 11373, 13323, 13373, 17373, 23323, 23373, 73373, 101373, 103323, 103373, 111373, 113323, 113373, 117373, 123323, 123373, 173373, 323373, 373373
Offset: 1

Views

Author

Allan C. Wechsler, Mar 07 2000

Keywords

Comments

Indices of records in A005589 (which only counts letters, but not spaces and punctuation, in the English name of numbers).

Examples

			Note that A052360(373373) = 64 and A005589(373373) = 56.
Sequence A052362 uses A052360 which also counts spaces and dashes, therefore "twenty-one" is in that sequence but not in this one: it uses one more character ('-') but has the same number of letters than "seventeen". - _M. F. Hasler_, Aug 12 2020
		

Crossrefs

Programs

  • PARI
    m=0; for(n=0, 2e6, if(m<A005589(n), m=A005589(n); print1(n", "))) \\ M. F. Hasler, Aug 12 2020
    
  • Python
    from itertools import count, islice
    from num2words import num2words as n2w
    def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())
    def agen():
        record = 0
        for n in count(0):
            value = f(n)
            if value > record: yield n; record = value
            n += 1
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jul 12 2022

Extensions

Edited by R. J. Mathar and T. D. Noe, Apr 09 2009
Minor edits by Ray Chandler, Jul 22 2009
a(41) and beyond from Michael S. Branicky, Jul 12 2022

A037196 Number of vowels in the American English name of n.

Original entry on oeis.org

2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 3, 2, 3, 4, 3, 3, 4, 4, 4, 1, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 3, 2, 3, 3, 3, 2, 3, 3, 3, 1, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 4, 3, 4, 4, 4, 3, 4, 4, 4, 2, 4, 3, 4, 4, 4, 3, 4, 4, 4, 2, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4, 6, 5, 6, 6
Offset: 0

Views

Author

Keywords

Comments

"American English" means that there is no "and" in the names of numbers, cf. example. - M. F. Hasler, Aug 26 2020

Examples

			a(20) = 1 for "twEnty" with 1 vowel: 'y' does not count.
a(101) = 6 for "OnE hUndrEd OnE" with 6 vowels: no "and" as in the "British" variant "one hundred and one" which would have 7 vowels.
		

Crossrefs

Cf. A005589, A052360 (number of letters in English name of numbers with/without spaces and dashes).
Sequences related to vowels: A102869, A158352, A158354 (smallest number with n [distinct] vowels in AE / BE), A158353, A158355 (ditto, increasing), A058179 (all 5 vowels), A058180 (ditto, exactly once), A000852, A000861 (start/end with vowel), A019270, A080518 (self-describing), A059437, A079741, A152592, A174879, A241858, A332068, A332069.

Programs

  • PARI
    vowels=Vec("aeiou"); apply( {A037196(n)=#[c|c<-Vec(English(n)),setsearch(vowels,c)]}, [0..104]) \\ see A052360 for English(). - M. F. Hasler, Aug 26 2020
    
  • Python
    from num2words import num2words
    def a(n): return sum(1 for c in num2words(n).replace(" and", "") if c in "aeiou")
    print([a(n) for n in range(105)]) # Michael S. Branicky, Mar 23 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000
Name edited and crossrefs added by M. F. Hasler, Aug 26 2020
a(19)=4 corrected by Sean A. Irvine, Dec 16 2020

A007005 Number of characters in the French spelling of n, including spaces and hyphens.

Original entry on oeis.org

4, 2, 4, 5, 6, 4, 3, 4, 4, 4, 3, 4, 5, 6, 8, 6, 5, 8, 8, 8, 5, 11, 10, 11, 12, 10, 9, 10, 10, 10, 6, 12, 11, 12, 13, 11, 10, 11, 11, 11, 8, 14, 13, 14, 15, 13, 12, 13, 13, 13, 9, 15, 14, 15, 16, 14, 13, 14, 14, 14, 8, 14, 13, 14, 15, 13, 12, 13, 13, 13, 12, 16, 14, 15, 17, 15, 14
Offset: 0

Views

Author

Keywords

Comments

This sequence gives the number of characters, including spaces and hyphens, in the French spelling of the numbers; e.g., a(21) = 11 = #"vingt et un", a(22) = 10 = #"vingt-deux". - M. F. Hasler, Nov 18 2009
See A167507 for a variant where only letters are counted, but spaces and hyphens are not counted. - M. F. Hasler, Jun 03 2012
See A052360 for the English version (and A005589 for the letters-only variant); A007208 for the German version. - M. F. Hasler, Sep 20 2014
This refers to the official French spelling, Swiss or Belgian variants ("septante", ...) are not considered here. - M. F. Hasler, Sep 21 2014

Examples

			a(0) = 4 = #"zéro"
a(80) = 13 = #"quatre-vingts"
a(999) = 31 = #"neuf cent quatre-vingt-dix-neuf"
a(1000) = 5 = # "mille"
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Extensions

a(71) and a(74) corrected by M. F. Hasler, Jun 03 2012
Example completed by Rémy Sigrist, Sep 09 2018
Showing 1-10 of 37 results. Next