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.

A104647 a(n) = a(n-1) mod n + a(n-2) mod n; a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 6, 6, 12, 8, 9, 17, 13, 16, 14, 14, 28, 24, 14, 18, 32, 28, 14, 18, 32, 24, 29, 25, 25, 50, 44, 30, 41, 37, 8, 9, 17, 26, 43, 29, 31, 60, 48, 20, 23, 43, 66, 61, 29, 40, 69, 57, 20, 23, 43, 66, 52, 60, 53, 53, 106, 97, 77, 46, 58, 104, 95, 63, 89, 82, 29, 39, 68
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 21 2005

Keywords

Comments

a(n) <= a(n-1) + a(n-2) < 2*n for n>0, see A105859 for numbers i such that a(i)=a(i-1)+a(i-2) and A105860 for numbers j with a(j)Reinhard Zumkeller, Apr 23 2005
A105855 = (first differences) and A105856 = (partial sums); records occur at A105857: A105858(n) = a(A105857(n)). - Reinhard Zumkeller, Apr 23 2005

Crossrefs

Programs

  • Mathematica
    Fold[Append[#1, Mod[#1[[-1]], #2] + Mod[#1[[-2]], #2]] &, {0, 1}, Range[2, 73]] (* Ivan Neretin, Jun 18 2018 *)
    nxt[{n_,a_,b_}]:={n+1,b,Mod[a,n+1]+Mod[b,n+1]}; NestList[nxt,{1,0,1},80][[;;,2]] (* Harvey P. Dale, May 12 2025 *)