OFFSET
0,1
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
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
EXAMPLE
"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)
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 *)
PROG
(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
CROSSREFS
Row sums of A073029.
KEYWORD
AUTHOR
Paul Lusch, Aug 22 2002
EXTENSIONS
a(0) added by N. J. A. Sloane, Jun 30, 2008
More terms from Jon E. Schoenfield, Aug 30 2009
STATUS
approved