OFFSET
1,2
COMMENTS
The sequence, starting with a(1) = 1 and a(2) = 2, never enters into a loop.
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..10002
EXAMPLE
a(1) + first digit of a(2) = 1 + 2 = a(3) = 3,
a(2) + first digit of a(3) = 2 + 3 = a(4) = 5,
a(3) + first digit of a(4) = 3 + 5 = a(5) = 8,
a(4) + first digit of a(5) = 5 + 8 = a(6) = 13,
a(5) + first digit of a(6) = 8 + 1 = a(7) = 9,
a(6) + first digit of a(7) = 13 + 9 = a(8) = 22,
a(7) + first digit of a(8) = 9 + 2 = a(9) = 11,
etc.
MATHEMATICA
nxt[{a_, b_}]:={b, a+IntegerDigits[b][[1]]}; NestList[nxt, {1, 2}, 80][[;; , 1]] (* Harvey P. Dale, Nov 19 2023 *)
PROG
(PARI) a=vector(10^4); a[1]=1; a[2]=2; for(n=3, #a, a[n]=digits(a[n-1])[1]+a[n-2]); a \\ Altug Alkan, Mar 20 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Mar 20 2018
STATUS
approved