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

A073327 Write U.S. English name for n (ignoring hyphens and spaces) and add numerical values of letters using a=1, b=2, ..., y=25, z=26.

Original entry on oeis.org

64, 34, 58, 56, 60, 42, 52, 65, 49, 42, 39, 63, 87, 99, 104, 65, 96, 109, 73, 86, 107, 141, 165, 163, 167, 149, 159, 172, 156, 149, 100, 134, 158, 156, 160, 142, 152, 165, 149, 142, 84, 118, 142, 140, 144, 126, 136, 149, 133, 126, 66, 100, 124, 122, 126, 108, 118
Offset: 0

Views

Author

Paul Lusch, Aug 22 2002

Keywords

Comments

In writing out the names for these numbers, "and" is not used in U.S. English; e.g., 101 is rendered as "one hundred one" rather than "one hundred and one". - Robert Israel, Jun 12 2019
The British English version is too similar to this to have its own entry. They first differ at n=101, where here a(101) = 142, whereas in British English 101 is "one hundred and one", which is 161. - N. J. A. Sloane, Jun 09 2021
From Robert Israel's data it appears that the U.S. version has no fixed points, and the British version has exactly two fixed points, at 251 and 259. I do not know if either version has cycles of length >= 2 apart from the cycles of length 5 that are visible in A345126 and A345157. - N. J. A. Sloane, Jun 11 2021

Examples

			"One" = 15 + 14 + 5 = 34 (o is 15th letter, n is 14th letter, e is 5th letter).
From _Omar E. Pol_, Jun 15 2021: (Start)
-----------------------------------------------------
   n      Name      Calculation                  a(n)
-----------------------------------------------------
   0      Zero      26 +  5 + 18 + 15           = 64
   1      One       15 + 14 +  5                = 34
   2      Two       20 + 23 + 15                = 58
   3      Three     20 +  8 + 18 +  5 +  5      = 56
   4      Four       6 + 15 + 21 + 18           = 60
   5      Five       6 +  9 + 22 +  5           = 42
   6      Six       19 +  9 + 24                = 52
   7      Seven     19 +  5 + 22 +  5 + 14      = 65
   8      Eight      5 +  9 +  7 +  8 + 20      = 49
   9      Nine      14 +  9 + 14 +  5           = 42
  10      Ten       20 +  5 + 14                = 39
  11      Eleven     5 + 12 +  5 + 22 +  5 + 14 = 63
  12      Twelve    20 + 23 +  5 + 12 + 22 +  5 = 87
... (End)
		

Crossrefs

Row sums of A073029.
For analogs in other languages see A169639 (French), A119945 (German), A161406 (Spanish).

Programs

  • Maple
    # Maple program for US English
    f:= proc(n) local S;
       uses StringTools;
      S:= Select(IsAlpha,convert(n,english));
      convert(map(`-`,convert(S,bytes),96),`+`)
    end proc:
    map(f, [$0..100]); # Robert Israel, Jun 12 2019
    # British English version, valid for n < 10^9
    f:= proc(n) local S;
       uses StringTools;
      S:= Select(IsAlpha, convert(n, english, And));
      convert(map(`-`, convert(S, bytes), 96), `+`)
    end proc:
    map(f, [$0..200]); # Robert Israel, Jun 11 2021
  • Mathematica
    a[n_] := Total@ Flatten[ ToCharacterCode@# - 96 & /@ Characters@ StringDelete[IntegerName@ n, Except@ LetterCharacter]] (* after Michael De Vlieger in A362065 *); Array[a, 57, 0] (* Robert G. Wilson v, Apr 19 2023 *)
  • PARI
    A073327(n)=sum(i=1,#n=select(t->t>64,Vec(Vecsmall(English(n)))),n[i]%32) \\ see A052360 for English(). - M. F. Hasler, Jun 22 2013
    
  • Python
    import re
    from num2words import num2words
    # US English
    def A073327(n): return sum(ord(d)-96 for d in re.sub(r"\sand\s|[^a-z]", "", num2words(n)))
    # British English
    def A073327(n): return sum(ord(d)-96 for d in re.sub("[^a-z]", "", num2words(n, lang='en_GB'))) # Chai Wah Wu, Jun 13 2021

Extensions

a(0) added by N. J. A. Sloane, Jun 30 2008
More terms from Jon E. Schoenfield, Aug 30 2009

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

A161406 Write the Spanish name for n (ignoring spaces) and add numerical values of letters using a=1, b=2, ..., ñ=15, ..., y=26, z=27, n >= 0.

Original entry on oeis.org

43, 52, 40, 65, 82, 45, 54, 60, 43, 69, 45, 38, 28, 53, 68, 71, 84, 90, 73, 99, 77, 133, 121, 146, 163, 126, 135, 141, 124, 150, 90, 168, 156, 181, 198, 161, 170, 176, 159, 185, 86, 164, 152, 177, 194, 157, 166, 172, 155, 181, 92, 170, 158, 183, 200, 163, 172, 178, 161
Offset: 0

Views

Author

Claudio Meller, Jun 09 2009

Keywords

Comments

Spanish has one more letter than English: ñ is the 15th letter.

Examples

			From _Omar E. Pol_, May 10 2021: (Start)
----------------------------------------------------
   n      Name     Calculation                  a(n)
----------------------------------------------------
   0      Cero      3 +  5 + 19 + 16           = 43
   1      Uno      22 + 14 + 16                = 52
   2      Dos       4 + 16 + 20                = 40
   3      Tres     21 + 19 +  5 + 20           = 65
   4      Cuatro    3 + 22 +  1 + 21 + 19 + 16 = 82
   5      Cinco     3 +  9 + 14 +  3 + 16      = 45
   6      Seis     20 +  5 +  9 + 20           = 54
   7      Siete    20 +  9 +  5 + 21 +  5      = 60
   8      Ocho     16 +  3 +  8 + 16           = 43
   9      Nueve    14 + 22 +  5 + 23 +  5      = 69
  10      Diez      4 +  9 +  5 + 27           = 45
  11      Once     16 + 14 +  3 +  5           = 38
  12      Doce      4 + 16 +  3 +  5           = 28
... (End)
		

Crossrefs

For analogs in other languages see A073327 (U.S. English), A169639 (French), A119945 (German).

Extensions

Name edited and offset corrected by Omar E. Pol, Jun 10 2021

A226911 Remainder modulo n of the sum of the letters of the English word(s) for n (A073327: a=1, ..., z=26).

Original entry on oeis.org

0, 0, 2, 0, 2, 4, 2, 1, 6, 9, 8, 3, 8, 6, 5, 0, 7, 1, 10, 7, 15, 11, 2, 23, 24, 3, 10, 16, 4, 10, 10, 30, 24, 24, 2, 8, 17, 35, 25, 4, 36, 16, 11, 12, 36, 44, 8, 37, 28, 16, 49, 20, 16, 18, 53, 6, 17, 57, 49, 37, 9, 31, 27, 29, 9, 17, 28, 10, 1, 40, 2, 24, 20, 22, 2, 10, 21, 3
Offset: 1

Views

Author

Eric Angelini and M. F. Hasler, Jun 22 2013

Keywords

Comments

By definition, a(n) < n so iterated application of this function to any initial value n will create a strictly decreasing sequence ending in 0.

Crossrefs

Programs

  • Maple
    f:= proc(n) local S;
       uses StringTools;
      S:= Select(IsAlpha,convert(n,english));
      convert(map(`-`,convert(S,bytes),96),`+`) mod n
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 12 2019
  • Mathematica
    a[n_] := Mod[Total@ Flatten[ ToCharacterCode[#] - 96 & /@ Characters@ StringDelete[ IntegerName[n], Except@ LetterCharacter]], n] (* after Michael De Vlieger in A362065 *); Array[a, 78] (* Robert G. Wilson v, Apr 22 2023 *)
  • PARI
    A226911 = n->A073327(n)%n

Formula

a(n) = A073327(n) mod n.
It appears that a(n) = A073327(n) for n > 279. - Robert Israel, Jun 12 2019

A226942 Number of iterations of A226911 until 0 is reached, for starting value n.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jun 23 2013

Keywords

Comments

Iterating the map A226911 was suggested in the SeqFan post by E. Angelini, cf link.

Crossrefs

Programs

  • Maple
    f:= proc(n) local S;
      uses StringTools;
      S:= Select(IsAlpha, convert(n, english));
      convert(map(`-`, convert(S, bytes), 96), `+`) mod n
    end proc:
    g:= proc(n) option remember;
        local v;
        v:= f(n);
        1+procname(v)
    end proc:
    g(0):= 0:
    map(g, [$1..100]); # Robert Israel, Jun 13 2019
  • PARI
    A226942 = n -> for(c=1,9e9,(n=A226911(n))||return(c))

A119946 Final digit sum of numerical values of German names of the nonnegative numbers.

Original entry on oeis.org

5, 2, 9, 9, 9, 7, 9, 9, 5, 9, 8, 5, 6, 8, 8, 6, 8, 7, 4, 8, 7, 2, 1, 1, 1, 8, 1, 1, 6, 1, 9, 4, 3, 3, 3, 1, 3, 3, 8, 3, 6, 1, 9, 9, 9, 7, 9, 9, 5, 9, 4, 8, 7, 7, 7, 5, 7, 7, 3, 7, 5, 9, 8, 8, 8, 6, 8, 8, 4, 8, 5, 9, 8, 8, 8, 6, 8, 8, 4, 8, 9
Offset: 0

Views

Author

Wolfdieter Lang, Jul 20 2006

Keywords

Comments

The first digits sums are given in A119945.
Umlaute are taken as ``ae'' (not appearing), ``oe'', ``ue'' and ``sz'' (scharp s) (like in the German name for ``30'') as ``ss'' (not "sz").

Examples

			``Null'' in German for the number 0 has first digit sum
59=A119945(0). Therefore the next digit sum becomes 5+9=14 and finally
1+4=5, hence a(0)=5.
		
Showing 1-6 of 6 results.