login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167507 Number of letters in the French spelling of the number n, not counting hyphens and spaces. 20
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, 11, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Sequence A007005 is a variant of this sequence, where spaces and hyphens are counted.

Ivan N. Ianakiev remarks in A005589 that in many languages there exists a number N after which all numbers are written with fewer letters than the number itself. In English and in French, N = 4.  If n > 4, then a(n) < n, and if n <= 4, then a(n) >= n, with strict inequality in French. - Bernard Schott, Jan 11 2019

LINKS

Table of n, a(n) for n=0..81.

Wiktionnaire, Annexe:Nombres de 1 à 100 en français (as of Nov. 18, 2009).

Index entries for sequences related to names of numbers

EXAMPLE

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).

PROG

(PARI) A167507(n) = sum( i=1, #n=Vecsmall( French( n )), n[i]>96 )

/* 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)))}

CROSSREFS

Cf. A005589 (English analog), A167508 (counts distinct letters).

Cf. A006994 (Russian analog), A007208 (German analog), A011762 (Spanish analog), A026858 (Italian analog).

Sequence in context: A224183 A131953 A167508 * A007005 A237869 A066978

Adjacent sequences:  A167504 A167505 A167506 * A167508 A167509 A167510

KEYWORD

nonn,word

AUTHOR

M. F. Hasler, Nov 18 2009

EXTENSIONS

Removed keyword "fini", added PARI code M. F. Hasler, Nov 19 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 13 18:14 EDT 2019. Contains 327981 sequences. (Running on oeis4.)