OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..3793
EXAMPLE
a(6): sum of first 2 digits of a(5)=13, append 13 to 58 and get 5813, drop first digit and get 813.
MAPLE
f:= proc(x) local t, q;
t:= floor(x/10^(ilog10(x)-1));
t:= (t mod 10) + floor(t/10);
t:= t+x*10^(ilog10(t)+1);
q:= 10^ilog10(t);
t - floor(t/q)*q
end proc:x:= 11: R:= x:
for n from 2 to 100 do x:= f(x); R:= R, x od:R; # Robert Israel, May 21 2020
# second Maple program:
a:= proc(n) option remember; `if`(n=1, 11, (s->parse(cat(
s[2..-1], parse(s[1])+parse(s[2]))))(""||(a(n-1))))
end:
seq(a(n), n=1..35); # Alois P. Heinz, May 21 2020
MATHEMATICA
fd[n_]:=Module[{idn=IntegerDigits[n]}, FromDigits[Rest[Join[idn, IntegerDigits[Total[Take[idn, 2]]]]]]]
NestList[fd, 11, 30] (* Harvey P. Dale, Mar 06 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bodo Zinser, Mar 22 2004
STATUS
approved