login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #69 Apr 20 2023 09:04:00

%S 64,34,58,56,60,42,52,65,49,42,39,63,87,99,104,65,96,109,73,86,107,

%T 141,165,163,167,149,159,172,156,149,100,134,158,156,160,142,152,165,

%U 149,142,84,118,142,140,144,126,136,149,133,126,66,100,124,122,126,108,118

%N 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.

%C 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

%C 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

%C 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

%H Robert Israel, <a href="/A073327/b073327.txt">Table of n, a(n) for n = 0..10000</a>

%H M. F. Hasler in reply to E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2013-June/011350.html">English number words modulo themselves</a>, SeqFan list, Jun 21 2013

%H Robert Israel, <a href="/A073327/a073327_1.txt">British English version of b-file</a>

%e "One" = 15 + 14 + 5 = 34 (o is 15th letter, n is 14th letter, e is 5th letter).

%e From _Omar E. Pol_, Jun 15 2021: (Start)

%e -----------------------------------------------------

%e n Name Calculation a(n)

%e -----------------------------------------------------

%e 0 Zero 26 + 5 + 18 + 15 = 64

%e 1 One 15 + 14 + 5 = 34

%e 2 Two 20 + 23 + 15 = 58

%e 3 Three 20 + 8 + 18 + 5 + 5 = 56

%e 4 Four 6 + 15 + 21 + 18 = 60

%e 5 Five 6 + 9 + 22 + 5 = 42

%e 6 Six 19 + 9 + 24 = 52

%e 7 Seven 19 + 5 + 22 + 5 + 14 = 65

%e 8 Eight 5 + 9 + 7 + 8 + 20 = 49

%e 9 Nine 14 + 9 + 14 + 5 = 42

%e 10 Ten 20 + 5 + 14 = 39

%e 11 Eleven 5 + 12 + 5 + 22 + 5 + 14 = 63

%e 12 Twelve 20 + 23 + 5 + 12 + 22 + 5 = 87

%e ... (End)

%p # Maple program for US English

%p f:= proc(n) local S;

%p uses StringTools;

%p S:= Select(IsAlpha,convert(n,english));

%p convert(map(`-`,convert(S,bytes),96),`+`)

%p end proc:

%p map(f, [$0..100]); # _Robert Israel_, Jun 12 2019

%p # British English version, valid for n < 10^9

%p f:= proc(n) local S;

%p uses StringTools;

%p S:= Select(IsAlpha, convert(n, english, And));

%p convert(map(`-`, convert(S, bytes), 96), `+`)

%p end proc:

%p map(f, [$0..200]); # _Robert Israel_, Jun 11 2021

%t 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 *)

%o (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

%o (Python)

%o import re

%o from num2words import num2words

%o # US English

%o def A073327(n): return sum(ord(d)-96 for d in re.sub("\sand\s|[^a-z]", "", num2words(n)))

%o # British English

%o 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

%Y Row sums of A073029.

%Y For analogs in other languages see A169639 (French), A119945 (German), A161406 (Spanish).

%Y Cf. A005589, A072922, A075831, A152611, A345126, A345157.

%K nonn,word,look

%O 0,1

%A _Paul Lusch_, Aug 22 2002

%E a(0) added by _N. J. A. Sloane_, Jun 30, 2008

%E More terms from _Jon E. Schoenfield_, Aug 30 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)