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.
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
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)
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- M. F. Hasler in reply to E. Angelini, English number words modulo themselves, SeqFan list, Jun 21 2013
- Robert Israel, British English version of b-file
Crossrefs
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
Comments