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.

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

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 13, 17, 20, 26, 34, 34, 40, 44, 52, 62, 78, 83, 101, 121, 134, 140, 154, 169, 193, 200, 225, 251, 266, 269, 279, 284, 291, 295, 298, 334, 366, 388, 394, 413, 429, 455, 488, 493, 521, 544, 585, 590, 625, 654, 655, 673, 680, 693
Offset: 0

Views

Author

Alex Ratushnyak, Apr 29 2012

Keywords

Crossrefs

Cf. A182445.

Programs

  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,b+Mod[a,n+1]}; NestList[nxt,{1,0,1},60][[All,2]] (* Harvey P. Dale, May 30 2020 *)
  • Python
    prpr = 0
    prev = 1
    for i in range(2,99):
        current = prev + (prpr % i)
        print(prpr, end=', ')
        prpr = prev
        prev = current