OFFSET
1,3
COMMENTS
By definition, a(n) < n so iterated application of this function to any initial value n will create a strictly decreasing sequence ending in 0.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
M. Hasler in reply to E. Angelini, English number words modulo themselves, SeqFan list, Jun 21 2013
FORMULA
a(n) = A073327(n) mod n.
It appears that a(n) = A073327(n) for n > 279. - Robert Israel, Jun 12 2019
MAPLE
f:= proc(n) local S;
uses StringTools;
S:= Select(IsAlpha, convert(n, english));
convert(map(`-`, convert(S, bytes), 96), `+`) mod n
end proc:
map(f, [$1..100]); # Robert Israel, Jun 12 2019
MATHEMATICA
a[n_] := Mod[Total@ Flatten[ ToCharacterCode[#] - 96 & /@ Characters@ StringDelete[ IntegerName[n], Except@ LetterCharacter]], n] (* after Michael De Vlieger in A362065 *); Array[a, 78] (* Robert G. Wilson v, Apr 22 2023 *)
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and M. F. Hasler, Jun 22 2013
STATUS
approved