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-8 of 8 results.

A167507 Number of letters in the French spelling of the number n, not counting hyphens and spaces.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 18 2009

Keywords

Comments

Sequence A007005 is a variant of this sequence, where spaces and hyphens are counted.
In most languages, there exists a number N after which all numbers are written with fewer letters than the number itself. In English, in German and in French, N = 4. Here, if n > 4, then a(n) < n, and if n <= 4, then a(n) > n. - Bernard Schott, Jan 11 2019

Examples

			The terms a(0),...,a(16) represent the number of characters in the strings "zéro", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "onze", "douze", "treize", "quatorze", "quinze", "seize".
Since spaces and punctuation are not counted, a(n) is less than the length of the character string whenever the spelling of n contains hyphens, as in "dix-sept" (a(17)=7), or spaces as in "vingt et un" (a(21)=9).
		

Crossrefs

Cf. A005589 (English analog), A167508 (counts distinct letters).
Cf. A001050 (Finnish analog), A006994 (Russian analog), A007208 (German analog), A011762 (Spanish analog), A026858 (Italian analog).

Programs

  • PARI
    apply( {A167507(n)=#[0|c<-Vecsmall(French(n)), c>96]}, [0..81]) \\ updated by M. F. Hasler, Feb 19 2020 [If old versions of PARI/gp give an error, use e.g. Vec(Vecsmall...).]
    /* Helper function: spell out n in French. Extended to 10^24 (now further extensible via the 2nd optional argument) for A204593 on Feb 16 2012. */
    French(n, t=[10^18,"trillion", /*10^15,"billiard",*/ 10^12,"billion", 10^9,"milliard", 10^6,"million"])={ if( n>999, n>=10^6*t[1] & error(n" is too large - this implementation is restricted to n < 10^",5+#Str(t[1])); forstep(i=1,#t,2, n\t[i] & return(Str(French(n\t[i])" "t[i+1], if(n\t[i]>1,"s",""), if(n%t[i],Str(" "French(n%t[i])),"")))); return(Str(if(n\1000>1,Str(French(n\1000)," "),""),"mille",if(n%1000,Str(" ", French(n%1000)),""))));
    n<20 & return([ "zero","un","deux","trois","quatre","cinq","six","sept","huit","neuf", "dix","onze", "douze","treize","quatorze","quinze","seize","dix-sept","dix-huit","dix-neuf"][n+1]);
    n >= 100 & return( Str( if( n>199, Str(French(n\100)," "), ""), "cent", if(n%100,Str(" ",French(n%100)),if(n>199,"s","")/*deux cents*/)));
    n > 80 & return( Str( "quatre-vingt-", French( n-80 )));
    n%10==0 & return( Str( ["vingt","trente","quarante","cinquante","soixante", "soixante-dix","quatre-vingts"][n\10-1] ));
    Str( French((n\10-(n>70))*10), if(n%10==1," et ","-"), French(n%10+10*(n>70)))}
    \\ M. F. Hasler, Nov 19 2009

Extensions

Keyword "fini" removed by M. F. Hasler, Nov 19 2009
a(80) and a(81) corrected by Bernard Schott, Feb 19 2020

A101432 Each term is the number of letters in the Spanish name of the previous term.

Original entry on oeis.org

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

Views

Author

Kevin Langdon (kevin.langdon(AT)polymath-systems.com), Jan 17 2005; corrected May 24 2005

Keywords

Examples

			Uno tres cuatro seis cuatro seis ...
		

Crossrefs

Cf. A011762 (number of letters).
Cf. A000655 (English), A061504 (French), A328263 (Polish).

Formula

a(n) = 5-(-1)^n for n>1, with a(0)=1 and a(1)=3. - Wesley Ivan Hurt, Oct 03 2020

Extensions

More terms from Kara A. Houck (kah979(AT)psu.edu), Apr 20 2006

A131603 Number of letters in n (in Filipino or Tagalog, excluding spaces and hyphens).

Original entry on oeis.org

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

Views

Author

Ray G. Opao, Jun 08 2011

Keywords

Examples

			a(2)=6, since 2 is dalawa in Filipino.
a(8)=4, since 8 is walo in Filipino.
		

Crossrefs

A153453 a(n) = letters(n) + a(n-1); a(0) = 0 in Spanish.

Original entry on oeis.org

0, 3, 6, 10, 16, 21, 25, 30, 34, 39, 43, 47, 51, 56, 63, 69, 78, 88, 97, 107, 113, 122, 131, 141, 153, 164, 174, 185, 195, 206, 213, 224, 235, 247, 261, 274, 286, 299, 311, 324, 332, 344, 356, 369, 384, 398, 411, 425, 438, 452, 461, 474, 487, 501, 517, 532, 546, 561, 575, 590, 597
Offset: 0

Views

Author

Rodolfo Kurchan, Dec 26 2008

Keywords

Crossrefs

Extensions

More terms from Álvar Ibeas, Sep 20 2020

A305403 Number of Ukrainian letters in Ukrainian name of n.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, May 31 2018

Keywords

Comments

Apostrophes, when the name is written with Ukrainian letters, are not counted as letters. If they were, then, for example, a(5) would be 5, but here, a(5) = 4, because the apostrophe is ignored.

Examples

			Using the BGN/PCGN romanization system, the names of numbers are nul', odyn, dva, try, chotyry, .... Note that the number of letters in the romanized name of n does not necessarily coincide with the number of letters when the name of n is written in Ukrainian script.
		

Crossrefs

Cf. A005589 (English), A007005 (French), A026858 (Italian), A006994 (Russian), A011762 (Spanish).

Programs

  • Mathematica
    (* only works up to 999999 *)
    upto20 = {0, 4, 3, 3, 6, 4, 5, 3, 5, 6, 6, 10, 10, 10, 12, 10, 11, 10, 12, 12, 8}
    tens = {0, 6, 8, 8, 5, 8, 9, 8, 10, 9}
    hundreds = {0, 3, 6, 6, 9, 6, 7, 6, 8, 8}
    thousands = {0, 10, 9, 9, 12}
    f[x_] := If[x == 0, 4, If[x > 999 && x < 5000, thousands[[Quotient[x, 1000] + 1]] + f[Mod[x, 1000]],
      If[
        x < 1000,
        If[Mod[x, 100] <= 20, upto20[[Mod[x, 100] + 1]], upto20[[Mod[x, 10] + 1]] + tens[[Mod[Quotient[x, 10], 10] + 1]]] + hundreds[[Mod[Quotient[x, 100], 10] + 1]] + thousands[[Mod[Quotient[x, 1000], 10] + 1]],
        5 + f[Quotient[x, 1000]] + If[Mod[x, 1000] == 0, 0, f[Mod[x, 1000]]]
      ]
    ]]
    For[i = 0, i <= 10000, i++,
      j = 0;
      Print[i, " ", f[i]]
    ] (* E-Hern Lee, Jul 11 2018 *)

Extensions

More terms from E-Hern Lee, Jul 11 2018

A109339 Number of letters in 2n (in Spanish).

Original entry on oeis.org

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

Views

Author

Cynthia Disenfeld (cynrd(AT)yahoo.com), Aug 20 2005

Keywords

Comments

Spaces are ignored.

Examples

			0: a(cero) = 4
2: a(dos) = 3
4: a(cuatro) = 6
6: a(seis) = 4
		

Crossrefs

Bisection of A011762.

Extensions

Extended by Ray Chandler, Jul 16 2009

A162355 Nonnegative integers whose Spanish and English names contain the same number of letters.

Original entry on oeis.org

0, 1, 2, 7, 20, 21, 22, 27, 70, 73, 78, 134, 141, 142, 147, 150, 153, 158, 165, 166, 169, 184, 194, 200, 201, 202, 207, 220, 221, 222, 227, 270, 273, 278, 305, 306, 309, 310, 317, 318, 325, 326, 329, 330, 333, 338, 371, 372, 377, 380, 383, 388, 390, 393, 398
Offset: 1

Views

Author

Claudio Meller, Jul 01 2009

Keywords

Comments

Spaces and hyphens are ignored.

Examples

			0 = "zero" = "cero"; 1 = "one" = "uno"; 2 = "two" = "dos"; 7 = "seven" = "siete".
		

Crossrefs

Formula

{n: A005589(n) = A011762(n)}

Extensions

Corrected by N. J. A. Sloane, Jul 01 2009 and Jul 13 2009
Remove 218, add 318 - Ray Chandler, Jul 15 2009

A173216 a(n) is the result of multiplying n by the number of letters of the name in Spanish.

Original entry on oeis.org

3, 6, 12, 24, 25, 24, 35, 32, 45, 40, 44, 48, 65, 98, 90, 144, 170, 162, 190, 120, 189, 198, 230, 288, 275, 260, 297, 280, 319, 210, 341, 352, 396, 476, 455, 432, 481, 456, 507, 320, 492, 504, 559, 660, 630, 598, 658, 624, 686, 450, 663, 676, 742, 864, 825, 784, 855, 812, 885, 420
Offset: 1

Views

Author

Rodolfo Kurchan, Feb 12 2010

Keywords

Examples

			a(1) is 3 because UNO has 3 letters by 1 = 3.
a(2) is 6 because DOS has 3 letters by 2 = 6.
a(3) is 12 because TRES has 4 letters by 3 = 12.
a(4) is 24 because CUATRO has 6 letters by 4 = 24.
a(5) is 25 because CINCO has 5 letters by 5 = 25.
		

References

  • Published in Snark, Feb 27 2001.

Crossrefs

Cf. A011762.

Formula

a(n) = n*A011762(n). - Michel Marcus, Nov 14 2023

Extensions

More terms from Michel Marcus, Nov 14 2023
Showing 1-8 of 8 results.