|
|
A010077
|
|
a(n) = sum of digits of a(n-1) + sum of digits of a(n-2); a(0) = 0, a(1) = 1.
|
|
16
|
|
|
0, 1, 1, 2, 3, 5, 8, 13, 12, 7, 10, 8, 9, 17, 17, 16, 15, 13, 10, 5, 6, 11, 8, 10, 9, 10, 10, 2, 3, 5, 8, 13, 12, 7, 10, 8, 9, 17, 17, 16, 15, 13, 10, 5, 6, 11, 8, 10, 9, 10, 10, 2, 3, 5, 8, 13, 12, 7, 10, 8, 9, 17, 17, 16, 15, 13, 10, 5, 6, 11, 8, 10, 9, 10, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
The digital sum analog (in base 10) of the Fibonacci recurrence. - Hieronymus Fischer, Jun 27 2007
a(n) and Fibonacci(n) = A000045(n) are congruent modulo 9 which implies that (a(n) mod 9) is equal to (Fibonacci(n) mod 9) = A007887(n). Thus (a(n) mod 9) is periodic with the Pisano period A001175(9)=24. - Hieronymus Fischer, Jun 27 2007
For general bases p > 2, we have the inequality 2 <= a(n) <= 2p-3 (for n > 2). Actually, a(n) <= 17 = A131319(10) for the base p=10. - Hieronymus Fischer, Jun 27 2007
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + a(n-2) - 9*(floor(a(n-1)/10) + floor(a(n-2)/10)). - Hieronymus Fischer, Jun 27 2007
a(n) = floor(a(n-1)/10) + floor(a(n-2)/10) + (a(n-1) mod 10) + (a(n-2) mod 10). - Hieronymus Fischer, Jun 27 2007
a(n) = Fibonacci(n) - 9*Sum_{k=2..n-1} Fibonacci(n-k+1)*floor(a(k)/10) where Fibonacci(n) = A000045(n). - Hieronymus Fischer, Jun 27 2007
|
|
MATHEMATICA
|
a[0] = 0; a[1] = 1; a[n_] := a[n] = Apply[ Plus, IntegerDigits[ a[n - 1] ]] + Apply[ Plus, IntegerDigits[ a[n - 2] ]]; Table[ a[n], {n, 0, 100} ]
nxt[{a_, b_}]:={b, Total[IntegerDigits[a]]+Total[IntegerDigits[b]]}; NestList[ nxt, {0, 1}, 80][[All, 1]] (* Harvey P. Dale, Apr 15 2018 *)
|
|
PROG
|
(PARI) first(n) = {n = max(n, 2); my(res = vector(n)); res[2] = 1; for(i = 3, n, res[i] = sumdigits(res[i-1]) + sumdigits(res[i-2]) ); res } \\ David A. Corneth, May 26 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|