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.

A182445 a(0)=0, a(1)=1, for n>1, a(n) = a(n-2) + (a(n-1) mod n).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 6, 14, 11, 15, 15, 18, 20, 24, 29, 37, 32, 51, 45, 56, 59, 71, 61, 84, 70, 102, 91, 109, 113, 132, 121, 157, 146, 167, 173, 196, 184, 228, 217, 245, 257, 250, 292, 278, 300, 302, 320, 334, 360, 344, 398, 378, 405, 405, 425, 438, 464, 438
Offset: 0

Views

Author

Alex Ratushnyak, Apr 29 2012

Keywords

Crossrefs

Cf. A182444.

Programs

  • Mathematica
    Fold[Append[#1, Mod[#1[[-1]], #2] + #1[[-2]]] &, {0, 1}, Range[2, 58]] (* Ivan Neretin, Jun 18 2018 *)
  • Python
    prpr = 0
    prev = 1
    for i in range(2,99):
        current = prpr + (prev % i)
        print(prpr, end=', ')
        prpr = prev
        prev = current