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.

Previous Showing 21-30 of 111 results. Next

A060403 Each term is the previous term plus the number of letters in the previous number, as conventionally spelled out in American English.

Original entry on oeis.org

1, 4, 8, 13, 21, 30, 36, 45, 54, 63, 73, 85, 95, 105, 119, 137, 158, 178, 200, 210, 223, 244, 263, 283, 304, 320, 338, 361, 381, 402, 416, 434, 455, 475, 497, 519, 538, 560, 576, 597, 619, 637, 658, 678, 700, 712, 730, 748, 770, 789, 811, 829, 851, 871, 893
Offset: 1

Views

Author

Kevin Langdon (kevin.langdon(AT)polymath-systems.com), Apr 05 2001

Keywords

Comments

Increases more slowly than A160395 since American English does not use 'and' to separate hundreds from the rest of the number. E.g., 619 = "six hundred nineteen" in American English but "six hundred and nineteen" in British English. - Carl R. White, May 12 2009

Examples

			a(2)=4 because a(1)=1 and 4 is 1 plus the number of letters in "one," 3.
		

References

  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See pages 49 and 214.

Crossrefs

Cf. A005589 See A139097 for another version.
For British English see A160395. - Carl R. White, May 12 2009

Programs

  • Mathematica
    NestList[#+Length[Select[Characters[IntegerName[#,"Words"]],LetterQ ]]&,1,54] (* James C. McMahon, Jul 30 2024 *)

Extensions

More terms from Carl R. White, May 12 2009

A006944 Number of letters in the n-th ordinal number (in American English).

Original entry on oeis.org

5, 6, 5, 6, 5, 5, 7, 6, 5, 5, 8, 7, 10, 10, 9, 9, 11, 10, 10, 9, 11, 12, 11, 12, 11, 11, 13, 12, 11, 9, 11, 12, 11, 12, 11, 11, 13, 12, 11, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 8, 10, 11, 10, 11, 10, 10, 12, 11, 10, 10, 12, 13, 12, 13, 12, 12
Offset: 1

Views

Author

Keywords

Comments

a(0) is ambiguous (see Wikipedia: English numerals link). It is either 6 or 7 depending on whether the word used is 'zeroth' or 'noughth'. - Jon Perry, Nov 01 2014
The ordinal numbers 101st, 102nd, etc., are commonly spoken as "one hundred and first," "one hundred and second," etc., with the word "and" following the word "hundred." The more concise wordings "one hundred first," "one hundred second," etc. (without the word "and") are recommended by numerous authoritative reference works on American English, including the AP Style Guide and the U.S. Government Printing Office Style Manual. The American convention of omitting the "and" is followed in the b-file. - Jon E. Schoenfield, Nov 04 2014

Examples

			"First" has 5 letters, so a(1)=5.
Hyphens and spaces are not counted, so, e.g., a(21)=11 ("twenty-first") and a(100)=12 ("one hundredth").
		

References

  • Netnews group rec.puzzles, Frequently Asked Questions (FAQ) file (Science Section).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005589.
Cf. A196278 (analog for French), A006969 (variant for French counting spaces and hyphens).

Programs

  • Python
    from num2words import num2words
    def a(n): return sum(1 for c in num2words(n, to='ordinal').replace(" and", "") if c.isalpha())
    print([a(n) for n in range(1, 77)]) # Michael S. Branicky, Aug 08 2021 edited Jul 12 2022

Extensions

More terms from Jon E. Schoenfield, Aug 13 2007

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

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

A073029 Names for numbers in American English, with each letter transformed into its index in the alphabet.

Original entry on oeis.org

26, 5, 18, 15, 15, 14, 5, 20, 23, 15, 20, 8, 18, 5, 5, 6, 15, 21, 18, 6, 9, 22, 5, 19, 9, 24, 19, 5, 22, 5, 14, 5, 9, 7, 8, 20, 14, 9, 14, 5, 20, 5, 14, 5, 12, 5, 22, 5, 14, 20, 23, 5, 12, 22, 5, 20, 8, 9, 18, 20, 5, 5, 14, 6, 15, 21, 18, 20, 5, 5, 14, 6, 9, 6, 20, 5, 5, 14, 19, 9, 24, 20, 5
Offset: 0

Views

Author

Zak Seidov, Aug 22 2002

Keywords

Comments

Irregular triangle read by rows, in which row n lists the successive indices of the letters in the American English name for n. For example, row one is 15, 14, 5. - N. J. A. Sloane, Apr 22 2023
Find smallest n's for which a(n)=1,2,3,4,...,26.
A: The numbers 10 and 11 never occur. The rows in which the others occur first (assuming use of the "short scale") are 1000 (thousAnd), 10^9 (Billion), 10^27 (oCtillion), 100 (hunDred), 0 (zEro), 4 (Four), 8 (eiGht), 3 (tHree), 5 (fIve), --, -- (j & k don't occur in English names of numbers), 11 (eLeven), 10^6 (Million), 1 (oNe), 0 (zerO), 10^24 (sePtillion), 10^15 (Quadrillion), 0 (zeRo), 6 (Six), 2 (Two), 4 (foUr), 5 (fiVe), 2 (tWo), 6 (siX), 20 (twentY), 0 (Zero). Converting the position in the row plus the preceding row lengths to a linear index n this yields (after subtracting 1 to match offset 0 of the sequence): 18452, ?, ?, 864, 1, 15, 33, 11, 20, -, -, 44, ?, 5, 3, ?, ?, 2, 23, 7, 17, 21, 8, 25, 115, 0. The graph nicely shows the position & frequency of the individual letters. - M. F. Hasler, Feb 06 2016

Examples

			Top row is for "zero"; "z" is the 26th letter in the alphabet, "e" the fifth, "r" the 18th and "o" the 15th, so the first row is 26,5,18,15.
		

Crossrefs

Cf. A005589 (row lengths).
Cf. A073327 (row sums).
Cf. A072922.

Programs

  • Mathematica
    alef=Characters["abcdefghijklmnopqrstuvwxyz"]; numb="zeroonetwothreefourfivesixseveneightnineteneleven[...]"; ch=Characters[numb]; seq[n_] := Position[alef, ch[[n]]][[1, 1]] (* Franklin T. Adams-Watters, Jun 02 2006 *)
    (* see the link to a001477.txt, copy the first 17 lines and then paste and assign to the variable 'str' as a string as follows *)
    str = "zeroonetwothreefourfivesixseveneightnineteneleventwelvethirteenfourteenfifteensixteen";
    Characters@ str /. Flatten[ Table[ {FromCharacterCode[96 + n] -> n}, {n, 26}]] (* Robert G. Wilson v, Jun 08 2010 *)
  • PARI
    A073029_row(n)=select(t->t>64,Vec(Vecsmall(English(n))))%32 \\ See A052360 for English(). - M. F. Hasler, Feb 06 2016
    
  • Python
    from num2words import num2words
    def row(n): return [ord(c)-96 for c in num2words(n).replace(" and", "") if c.isalpha()]
    print([e for n in range(17) for e in row(n)]) # Michael S. Branicky, Apr 22 2023

Extensions

Corrected and extended by Franklin T. Adams-Watters, Jun 02 2006, Oct 24 2006

A006090 Expansion of bracket function.

Original entry on oeis.org

1, -6, 21, -56, 126, -252, 463, -804, 1365, -2366, 4368, -8736, 18565, -40410, 87381, -184604, 379050, -758100, 1486675, -2884776, 5592405, -10919090, 21572460, -43144920, 87087001, -176565486, 357913941, -723002336
Offset: 0

Views

Author

Keywords

Crossrefs

Column 6 of A307047.

Programs

  • Mathematica
    CoefficientList[Series[1/((1+x)^6-x^6),{x,0,30}],x] (* or *) LinearRecurrence[ {-6,-15,-20,-15,-6},{1,-6,21,-56,126},31] (* Harvey P. Dale, Oct 14 2016 *)
  • PARI
    x='x+O('x^50); Vec(1/((1+x)^6-x^6)) \\ G. C. Greubel, Jul 02 2017

Formula

G.f.: 1/((1+x)^6-x^6).
a(n) = (-1)^n * Sum_{k=0..floor(n/6)} binomial(n+5,6*k+5). - Seiichi Manyama, Aug 05 2024

A085513 Number of "e"s in n (in English).

Original entry on oeis.org

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

Views

Author

Samuel Thompson (samuelt(AT)ugcs.caltech.edu), Jul 03 2003

Keywords

Comments

a(A006933(n)) = 0; a(A008520(n)) > 0. - Reinhard Zumkeller, Jan 23 2015
a(A006933(n)) = 0; a(A008520(n)) > 0; a(A121065(n)) = n and a(m) != n for m < A121065(n). - Reinhard Zumkeller, Jan 24 2015

Examples

			a(123) = 5 because "onE hundrEd twEnty-thrEE" has 5 e's.
		

Crossrefs

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
    a085513 = length . filter (== 'e') . T.unpack . numeral where
       numeral :: Integer -> Text
       numeral = fromJust . EN.gb_cardinal defaultInflection
    -- Reinhard Zumkeller, Jan 23 2015
    
  • Mathematica
    StringCount[IntegerName/@Range[0,99],"e"] (* Ivan N. Ianakiev, Mar 25 2017 *)
  • Python
    from num2words import num2words
    def A085513(n):
        return num2words(n).count('e') # Chai Wah Wu, Dec 20 2019

A000655 a(n) = number of letters in a(n-1), a(1) = 1 (in English).

Original entry on oeis.org

1, 3, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Keywords

Comments

Decimal expansion of 1219/900. - Elmo R. Oliveira, May 05 2024

Examples

			One, three, five, four, four, four, ...
		

Crossrefs

Cf. A005589 (number of letters).
Cf. A061504 (French), A101432 (Spanish), A328263 (Polish).

Programs

  • Mathematica
    Nest[Append[#, StringLength@ IntegerName[#[[-1]], "Words"]] &, {1}, 105] (* Michael De Vlieger, Feb 17 2021 *)

Formula

a(n) = 4 for n > 3, with a(1) = 1, a(2) = 3 and a(3) = 5. - Wesley Ivan Hurt, Oct 03 2020
E.g.f.: - 4 - 3*x - (1/2)*x^2 + (1/6)*x^3 + 4*exp(x). - Alejandro J. Becerra Jr., Feb 17 2021
G.f.: x*(1+2*x+2*x^2-x^3)/(1-x). - Elmo R. Oliveira, Jun 25 2024

A016037 Map numbers to number of letters in English name; sequence gives number of steps to converge (to 4).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The smallest n with a(n) = 7 is 1103323373373373373373373373373 (one nonillion one hundred and three octillion ...) which has 323 letters. - Roland Kneer, Jul 04 2013
From Robert G. Wilson v, Mar 13 2017: (Start)
First occurrence of k = 0,1,2,...: 4, 0, 3, 1, 11, 23, 323, 1103323373373373373373373373373, etc.;
0 only occurs at 4;
1 only occurs for n = 0, 5 & 9;
2 only occurs for n = 3, 7, 8, 17, 21, 22, 26, 31, 32, 36, 40, 44, 45, 49, 50, 54, 55, 59, 60, 64, 65, 69, 81, 82, 86, 91, 92 & 96;
3 occurs for n = 1, 2, 6, 10, 13, 14, 15, 16, 18, 19, 41, 42, 46, 51, 52, ..., ;
4 occurs for n = 11, 12, 20, 24, 25, 29, 30, 34, 35, 39, 43, 47, 48, 53, ..., ;
5 occurs for n = 23, 27, 28, 33, 37, 38, 73, 74, 75, 77, 78, 79, 83, 87, ..., ;
6 occurs for n = 323, 327, 328, 333, 337, 338, 374, 375, 379, 383, 387, ..., ; etc.
(End)
The basis of this sequence is that integers are named without the use of "and". As a minor correction at the time of this comment, therefore, the 31-digit number above beginning 1103 ... should be described as "one nonillion one hundred three octillion ...". If naming is done in accordance with UK English usage ("one hundred", "one hundred and one", ...), the first occurrence of a(n) = 0, 1, 2, 3, 4, 5, 6, 7, ... is for n = 4, 0, 3, 1, 11, 23, 124, 113373373373, ... Ian Duff, Dec 04 2019

Examples

			1 -> 3 -> 5 -> 4, so a(1) = 3.
		

Programs

  • Mathematica
    (* get t from A005589 *) f[n_] := Length@ NestWhileList[ StringLength@ t[[# + 1]] &, n, UnsameQ, 2] - 2; Array[f, 100, 0] (* Robert G. Wilson v, Jun 01 2012 *)

Extensions

Corrected at the suggestion of Kevin Ryde by Robert G. Wilson v, Jun 01 2012

A026858 Number of letters in n (in Italian).

Original entry on oeis.org

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

Views

Author

Alberto Maretti (alberto(AT)dis.uniroma1.it), Aug 03 2000

Keywords

Examples

			Zero, uno, due, tre, quattro, cinque, sei, ...
		

Crossrefs

Cf. A005589.

Programs

  • Python
    from num2words import num2words
    def A026858(n): return len(num2words(n,lang='it'))  # Chai Wah Wu, Apr 28 2024

Extensions

Corrected and extended by Marco Broglia, Oct 01 2008
Offset corrected to 0 ("zero") by Carmine Suriano, Jun 03 2011
Previous Showing 21-30 of 111 results. Next