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-10 of 24 results. Next

A169639 Write n in French (cf. A167507) and sum the letters using a=1, ..., z=26.

Original entry on oeis.org

64, 35, 54, 81, 82, 43, 52, 60, 58, 46, 37, 60, 71, 83, 123, 92, 64, 97, 95, 83, 72, 132, 126, 153, 154, 115, 124, 132, 130, 118, 82, 142, 136, 163, 164, 125, 134, 142, 140, 128, 97, 157, 151, 178, 179, 140, 149, 157, 155, 143, 104, 164, 158, 185, 186, 147, 156, 164
Offset: 0

Views

Author

Jacques ALARDET, Apr 04 2010

Keywords

Comments

Accents are ignored. - Chai Wah Wu, Jun 11 2021

Examples

			From _Omar E. Pol_, Jun 15 2021: (Start)
-----------------------------------------------------
   n      Name      Calculation                  a(n)
-----------------------------------------------------
   0      Zero      26 +  5 + 18 + 15           = 64
   1      Un        21 + 14                     = 35
   2      Deux       4 +  5 + 21 + 24           = 54
   3      Trois     20 + 18 + 15 +  9 + 19      = 81
   4      Quatre    17 + 21 +  1 + 20 + 18 +  5 = 82
   5      Cinq       3 +  9 + 14 + 17           = 43
   6      Six       19 +  9 + 24                = 52
   7      Sept      19 +  5 + 16 + 20           = 60
   8      Huit       8 + 21 +  9 + 20           = 58
   9      Neuf      14 +  5 + 21 +  6           = 46
  10      Dix        4 +  9 + 24                = 37
  11      Onze      15 + 14 + 26 +  5           = 60
  12      Douze      4 + 15 + 21 + 26 +  5      = 71
... (End)
		

Crossrefs

Cf. A167507, A169641 ("limit points").
For other languages see A073327 (U.S. English), A119945 (German), A161406 (Spanish).

Programs

  • PARI
    A169639(n)=vecsum([t%32|t<-Vecsmall(French(n)),t>64]) \\ Cf. A167507 for French(). - M. F. Hasler, Apr 08 2023
  • Python
    from num2words import num2words
    from unidecode import unidecode
    def A169639(n): return sum(ord(s)-96 for s in unidecode(num2words(n,lang='fr')) if s.isalpha()) # Chai Wah Wu, Jun 11 2021
    

Extensions

Edited by N. J. A. Sloane, Apr 05 2010
Offset corrected by Mohammed Yaseen, Jun 11 2021

A174984 Start with n, iterate the map k -> A167507(k) until we reach 3; a(n) = number of steps required.

Original entry on oeis.org

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

Views

Author

Jacques ALARDET, Apr 03 2010

Keywords

Examples

			a(0): zero => 4 => quatre => 6 => six => 3 ==> length = 4. a(1): un => 2 => deux => 4 => quatre => 6 => six => 3 ==> length = 5.
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Apr 05 2010

A174985 Start with n, iterate the map k -> A167507(k) until we reach 3, 4, 5 or 6; a(n) = number of steps required.

Original entry on oeis.org

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

Views

Author

Jacques ALARDET, Apr 03 2010

Keywords

Crossrefs

Extensions

Edited by N. J. A. Sloane, Apr 05 2010

A174987 Start with n, iterate the map k -> A167507(k) until we reach 3, 4, 5 or 6; a(n) = which of 3, 4, 5 or 6 we reach first.

Original entry on oeis.org

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

Views

Author

Jacques ALARDET, Apr 03 2010

Keywords

Crossrefs

Extensions

Edited by N. J. A. Sloane, Apr 05 2010

A052360 Number of characters in the English name of n, including spaces and hyphens.

Original entry on oeis.org

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

Views

Author

Allan C. Wechsler, Mar 07 2000

Keywords

Comments

See A007005 for the French analog, and A167507 for the "count letters only" variant (analog of A005589). - M. F. Hasler, Sep 20 2014

Examples

			Note that a(373373) = 64 whereas A005589(373373) = 56.
		

Crossrefs

Programs

  • Maple
    a:= n-> length(convert(n, english)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jul 30 2023
  • PARI
    English(n, pot=[10^9,"billion", 10^6,"million", 1000,"thousand", 100,"hundred"])={ n>99 && forstep( i=1,#pot,2, n999 && error("n >= 1000 ",pot[2]," not yet implemented");
    return( Str( English(n[1])," ",pot[i+1], if( n[2], Str(" ",English(n[2])), ""))));
    if( n<20, ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"][n+1],
      Str([ "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" ][n\10-1], if( n%10, Str("-",English(n%10)),"")))}
    A052360(n)=#English(n)  \\ M. F. Hasler, Jul 26 2011
    
  • Python
    from num2words import num2words
    def a(n): return len(num2words(n).replace(" and", "").replace(chr(44), ""))
    print([a(n) for n in range(78)]) # Michael S. Branicky, Jul 12 2022

Extensions

Minor edits by Ray Chandler, Jul 22 2009

A007208 Number of letters in German name of n.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 5, 6, 4, 4, 4, 3, 5, 8, 8, 8, 8, 8, 8, 8, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7, 13, 14, 14, 14, 14, 15, 16, 14, 14, 7
Offset: 0

Views

Author

Keywords

Comments

Standard German orthography; a letter with an umlaut or ß is counted as a single letter: e.g., 30 maps to length("dreißig") = 7.
There are ambiguities from n=100 on, since both, "hundert" and "einhundert" are equally valid and common. The same applies for 1000 with "tausend" or "eintausend". - M. F. Hasler, Nov 03 2013
In contrast to English (A005589 vs A052360) and French (A007005 vs A167507), there are no spaces or other punctuation in German names for numbers, until 10^6 = "eine Million". - M. F. Hasler, Sep 20 2014
There also appears to be an ambiguity on whether there is an 's' in the middle of 101*10^3, "(ein)hundertein(s)tausend". - M. F. Hasler, Apr 08 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005589 and A052360 (English analog).
Cf. A007005 and A167507 (French analog).

Programs

  • PARI
    /* Because names with ä, ö, ü or ß can't be entered directly as a string in the GP interface, we use a separate list for the names, for efficiency and readability of the main function. Note that the default lexicographical order is that of ISO 8859-1 character codes ("z" < "ß" < "ä"). In applications where this is not suitable, the special characters below can be replaced, e.g., with "ae, oe, ue, ss" or "a, o, u, s". [M. F. Hasler, Jul 05 2024] */
    {deutsch = ["eins", "zwei", "drei", "vier", Str("f"Strchr(252)"nf"), "sechs", "sieben", "acht", "neun", "zehn", "elf", Str("zw"Strchr(246)"lf"),  "dreizehn", "vierzehn", Str("f"Strchr(252)"nfzehn"), "sechzehn", "siebzehn", "achtzehn", "neunzehn", "zwanzig", Str("drei"Strchr(223)"ig"), "vierzig", Str("f"Strchr(252)"nfzig"), "sechzig", "siebzig", "achtzig", "neunzig"]}
    German(n, e="eins", power=0, name="")={ if(power /* internal helper function */
      , n = divrem(n, power); Str(German(n[1], e) name, if(n[2], German(n[2]), ""))
      , n < 20, if(n>1, deutsch[n], n, e, "null")
      , n < 100, Str(if(n%10, Str(German(n%10, "ein") "und"), "") deutsch[n\10+18])
      , n < 1000, German(n, "ein", 100, "hundert") \\ replace "ein" with "" to get
      , n < 10^6, German(n, "ein", 1000, "tausend")\\ hundert/tausend without "ein-"
      , my(t=3); while(n>=10^t, t+=3); German(n, "ein", 10^t-=3, strprintf(
          if(n\10^t>1, " %sen", t%2, "e %se", "e %s")  if(n%10^t, " ", ""),
          Str(["M", "B", "Tr", "Quadr", "Quint", "Sext", "Sept", "Oct", "Non",
               "Dez", "Undez" /* etc. */][t\6], "illi", ["on", "ard"][t%2+1])))
      )} \\ updated Mar 03 2020, Apr 08 2023, Jul 05 2024
    A007208 = n -> #German(n) \\ M. F. Hasler, Nov 01 2013
    A007208(n) = vecsum([c>32|c<-Vecsmall(German(n))]) \\ To exclude spaces; irrelevant for n < 10^6. - M. F. Hasler, Jul 05 2024

Extensions

Corrected by Markus Stausberg (markus(AT)polomi.de), Aug 08 2004
Initial term a(0) = 4 = #"null" added by M. F. Hasler, Nov 01 2013

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

A014254 Liponombres: numbers whose French name does not contain the letter "e".

Original entry on oeis.org

1, 3, 5, 6, 8, 10, 18, 20, 23, 25, 26, 28, 1000000, 1000001, 1000003, 1000005, 1000006, 1000008, 1000010, 1000018, 1000020, 1000023, 1000025, 1000026, 1000028, 3000000, 3000001, 3000003, 3000005, 3000006, 3000008, 3000010
Offset: 1

Views

Author

Keywords

Comments

In French also called: les nombres "évites" ou "apparés".
Could also be called les nombres "epers". - Benoit Cloitre, May 05 2003
French version of eban numbers (A006933): no "e" in name of number in French - "e" perd ("e" lost)!

Examples

			a(1) = 1 ("un"), a(2) = 3 ("trois", not "dEux")
		

References

  • Georges Perec, La disparition, Editions Gallimard, Paris, 1969; English translation: A Void, Harvill, 1994. (A novel that does not use the letter "e". These numbers are not mentioned, however.)

Crossrefs

Programs

Extensions

Additional comments from Bruno Salvy (Bruno.Salvy(AT)inria.fr) and Nicolas Graner (Nicolas.Graner(AT)cri.u-psud.fr), May 11 2003
Corrected by Don Reble, Nov 19 2006
Edited by M. F. Hasler, Nov 11 2015

A139212 Number of vowels in the preceding terms spelled out in French.

Original entry on oeis.org

0, 2, 4, 7, 8, 10, 11, 13, 16, 19, 22, 25, 27, 29, 32, 36, 39, 43, 49, 55, 60, 64, 71, 78, 85, 90, 95, 102, 105, 107, 109, 112, 116, 120, 122, 126, 129, 133, 138, 143, 150, 155, 161, 168, 175, 183, 190, 196, 204, 210, 214, 221, 227, 232, 239, 246, 254, 264, 274, 285, 293, 303, 308, 313, 319, 325, 330, 335, 341, 350, 357, 365, 373, 383
Offset: 1

Views

Author

N. J. A. Sloane (based on Angelini's article), Jun 08 2008

Keywords

Comments

Form a sequence of French words as follows: look to the left, towards the beginning of the sequence and write down the number of vowels you see; repeat; then replace the words by the corresponding numbers.
The sequence of words is: zero, deux, quatre, sept, huit, dix, onze, treize, seize, ...
Hyphens, accents and spaces are not counted.

Examples

			The second word is "deux" (and so a(2)=2 for the 'e' and the 'u'), because at the end of the first word ("zéro") we can see two vowels ('e' and 'o') to the left.
		

References

  • E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.

Crossrefs

For an English version see A139282.

Programs

  • PARI
    a(n)={ n>1 || return;#select(Vec(French(n=a(n-1))),x->setsearch(Vec("aeiou"),x))+n }  /* see A167507 for French() */
    /* Version with memoization for better performance when n >> 100: */
    A139212(n)={ type(a139212)!="t_VEC" && a139212=[];
    n > #a139212 && a139212=concat( a139212,vector(n-#a139212));
    (a139212[n] || n==1) && return(a139212[n]);
    a139212[n]=/*up to here only memoization, could be omitted*/
    #select(Vec(French(A139212(n-1))), x->setsearch(Vec("aeiou"),x))) + A139212(n-1) } \\ M. F. Hasler, Sep 29 2011

Extensions

Fixed offset (according to example) and typo in example. M. F. Hasler, Sep 29 2011

A233185 a(n) is the least number larger than the total number of letters in the French names for all terms up to and including a(n).

Original entry on oeis.org

5, 9, 15, 20, 29, 39, 50, 60, 68, 80, 96, 100, 108, 119, 130, 145, 160, 175, 196, 206, 220, 236, 256, 279, 300, 301, 315, 330, 350, 369, 395, 409, 428, 450, 469, 496, 506, 520, 536, 556, 579, 600, 601, 606, 620, 635, 655, 676, 700, 701, 706, 720, 736, 756, 776, 800, 801, 806, 820, 836, 856, 879, 900, 901, 910, 926, 945, 965, 988
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Dec 05 2013

Keywords

Comments

French version of A233184. See A233186 for a variant using weak inequality, "not smaller" instead of "larger", in the definition. In the English case this would only affect the first 4 terms, but not so in the French version.
See A233187-A233188 for German variants.

Examples

			The total length up to a(n), followed by the name of a(n), is as follows:
4 (cinq), 8 (neuf), 14 (quinze), 19 (vingt), 28 (vingt-neuf), 38 (trente-neuf), 47 (cinquante), 55 (soixante), 67 (soixante-huit), 79 (quatre-vingts), 95 (quatre-vingt-seize), 99 (cent), 107 (cent huit), 118 (cent dix-neuf), 128 (cent trente), 144 (cent quarante-cinq), ...
		

Programs

  • PARI
    a=0;k=0;for(n=1,99,until( k++ > a + A167507(k),); print1(k","); a+=A167507(k))
    
  • PARI
    a=k=0;for(n=1,99,until( k++ > a + A167507(k),); print1(a+=A167507(k)," ("French(k)"), ")) \\ to print the total length + name of a(n), see A167507 for French().
Showing 1-10 of 24 results. Next