|
|
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.
|
|
19
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
EXAMPLE
|
"One" = 15 + 14 + 5 = 34 (o is 15th letter, n is 14th letter, e is 5th letter).
-----------------------------------------------------
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:
# 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:
|
|
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("\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
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|