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.

Showing 1-1 of 1 results.

A215451 a(0)=1, a(n) = (sum of previous terms) mod (a(n-1)+n).

Original entry on oeis.org

1, 1, 2, 4, 0, 3, 2, 4, 5, 8, 12, 19, 30, 5, 1, 1, 13, 21, 15, 11, 3, 17, 22, 20, 0, 20, 10, 28, 54, 0, 2, 4, 14, 23, 33, 0, 12, 28, 52, 45, 35, 48, 88, 61, 42, 36, 35, 70, 16, 1, 8, 41, 3, 21, 0, 5, 18, 23, 43, 17, 1, 41, 65, 111, 149, 25, 1, 53, 29, 63, 98, 102, 154, 5
Offset: 0

Views

Author

Alex Ratushnyak, Aug 11 2012

Keywords

Comments

Indices of 0's: 4, 24, 29, 35, 54, 267, 5284, 17827, 43631, 120871, 843813, 1854903, 2226536, 4208775, 5525594, ...
Indices of 1's: 0, 1, 14, 15, 49, 60, 66, 116, 331, 6053, 23760, 288502, 496670, 4281666, ...
Indices such that a(n)=n: 1, 2, 22, 315, 1172, 1441, 1846, 2140, 47376, 593870, 16538298, 111824649, 565597433, 791186876, ...

Crossrefs

Programs

  • Mathematica
    nxt[{n_,t_,a_}]:=Module[{c=Mod[t,a+n+1]},{n+1,t+c,c}]; NestList[nxt,{0,1,1},80][[All,3]] (* Harvey P. Dale, Dec 30 2017 *)
  • Python
    s = a = 1
    for n in range(1,333):
        print(a, end=', ')
        a = s % (a+n)
        s += a

Formula

a(0)=1, a(n) = (a(0)+...+a(n-1)) mod (a(n-1)+n).
Showing 1-1 of 1 results.