%I #23 Nov 07 2024 23:08:54
%S 515904,11318,15216,10799546,129618,125258,14118,10211981,2839691,
%T 282506,14729,78236429,299309045,212445531527,68884716992,2457249197,
%U 7503281492,5427065792075,55893641747,150135668600,299310469
%N Using the US English names for the nonnegative integers, assign each letter a numerical value as in A073327 (A=1, B=2, ..., Z=26), treat the name as a base-27 integer, and convert to decimal.
%C For names with spaces (e.g., ONE HUNDRED), treat each space as a '0', or placeholder, in the base-27 system. (Therefore ONE HUNDRED = 3196540902115084.)
%C English name for the number n transliterated into Lee Sallows's base-27 system.
%D M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002).
%H M. J. Halm, <a href="http://michaelhalm.tripod.com/jootsy.htm">Jootsy Calculus</a>.
%F In Sallows's system, space = 0, A = 1, B = 2, etc. to Z = 26, so that words and phrases, even number names, can be transformed into numbers.
%e a(1) = 11318 because o(729) + n(27) + e = 10935 + 378 + 5 = 11318.
%e a(2) = 15216 because "TWO" in base 27 gives 20*27^2 + 23*27 + 15 = 15216.
%p lSallow27 := proc(s)
%p local a,i,c ;
%p a := 0 ;
%p for i from 1 to length(s) do
%p c := substring(s,i) ;
%p if c = " " then
%p a := 27*a ;
%p else
%p a := 27*a + StringTools[Ord](c) -96 ;
%p fi;
%p od:
%p a ;
%p end:
%p enums := ["one","two","three","four","five","six","seven","eight","nine","ten",
%p "eleven","twelve", "thirteen","fourteen","fifteen","sixteen","seventeen",
%p "eighteen","nineteen","twenty"]:
%p for i from 1 to nops(enums) do
%p printf("%d %d\n",i, lSallow27(enums[i])) ;
%p od:
%p # _R. J. Mathar_
%K easy,nonn,word
%O 0,1
%A _Michael Joseph Halm_, Aug 13 2002
%E Definition rephrased by _Matthew Goers_, Nov 03 2009
%E The old version of this sequence was wrong. _Don Reble_ and _R. J. Mathar_ supplied a corrected version. Edited by _N. J. A. Sloane_, Sep 20 2009
%E Edited by _N. J. A. Sloane_, Aug 15 2010 at the suggestion of _D. S. McNeil_
%E Offset corrected by _Sean A. Irvine_, Nov 07 2024