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-2 of 2 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

A030455 Numbers having the same number of digits as letters in their US English spelling.

Original entry on oeis.org

1000000000, 2000000000, 6000000000, 3000000000000, 7000000000000, 8000000000000, 10000000000001, 10000000000002, 10000000000006, 10000000000010, 11000000000000, 12000000000000, 20000000000000, 30000000000000, 80000000000000, 90000000000000, 3000000000000000
Offset: 1

Views

Author

Dann Toliver, 1999

Keywords

Comments

Or, numbers N such that A005589(N)=A055642(N).

Examples

			"One billion" has 10 letters and "1000000000" has 10 digits.
a(7)=10^13+1 (ten trillion one) has 14 digits and also 14 letters in the US English spelling (while the preferred British spelling is "...and one"). The same applies to a(8)=10^13+2, a(9)=10^13+6, a(10)=10^13+10, a(11)=11*10^12, a(12)=12*10^12, a(13)=20*10^12, a(14)=30*10^12, a(15)=80*10^12, a(16)=90*10^12. - _M. F. Hasler_, Feb 13 2012
		

Crossrefs

See A204593 for the French version.

Programs

  • PARI
    {N=1; while(1, while(0>d=#Str(N*=10)-A005589(N),);
    d | for(k=1,3,print1(k!*N", ")) | next;  for(k=1,90, for(u=0,90, A005589(k*N+u)==#Str(k*N) & print1(k*N+u","))))}

Extensions

Corrected by M. F. Hasler, Feb 13 2012
Showing 1-2 of 2 results.