A167508 Number of different letters in the French spelling of the number n.
4, 2, 4, 5, 6, 4, 3, 4, 4, 4, 3, 4, 5, 5, 8, 6, 4, 7, 6, 7, 5, 7, 9, 8, 10, 7, 7, 8, 7, 8, 4, 5, 7, 7, 7, 7, 7, 6, 7, 6, 7, 7, 9, 10, 7, 9, 10, 9, 9, 8, 8, 8, 10, 11, 9, 8, 10, 10, 9, 9, 8, 9, 10, 9, 11, 10, 8, 9, 10, 10, 9, 9, 11, 10, 12, 11, 9, 10, 11, 11, 10, 10, 12, 12, 10, 11, 12, 12, 11, 11, 12
Offset: 0
Examples
The terms a(0),...,a(12) represent the number of characters in the strings "zéro", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "onze", "douze". Since the "e" occurs twice in "treize", the number of different letters, a(13)=5, is less than the length of this string. The same is true when the spelling contains hyphens as in "dix-sept" (a(17)=7) or spaces as in "vingt et un" (a(21)=9-2, since among the 9 nonblank characters, "t" and "n" occur twice).
Links
- Wiktionnaire, Annexe:Nombres de 1 à 100 en français (as of Nov. 18, 2009).
Crossrefs
Cf. A167507.
Programs
-
Python
import re from num2words import num2words from unidecode import unidecode def A167508(n): return len(set(re.sub("[^a-z]", "", unidecode(num2words(n, lang='fr'))))) # Chai Wah Wu, Jun 13 2021
Comments