cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A010077 a(n) = sum of digits of a(n-1) + sum of digits of a(n-2); a(0) = 0, a(1) = 1.

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

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
a(n) == A004090(n) (mod 9) (A004090(n) = digital sum of Fibonacci(n)). - 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

Crossrefs

Programs

  • 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 *)
  • 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

Formula

Periodic from n=3 with period 24. - Franklin T. Adams-Watters, Mar 13 2006
a(n) = A030132(n-4) + A030132(n-3) for n>3. - Reinhard Zumkeller, Jul 04 2007
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) = A059995(a(n-1)) + A059995(a(n-2)) + A010879(a(n-1)) + A010879(a(n-2)). - 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