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.

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

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 16, 17, 18, 36, 54, 57, 73, 81, 84, 100, 105, 205, 305, 405, 413, 429, 634, 734, 788, 824, 842, 926, 928, 1854, 2782, 3606, 6388, 6424, 9206, 9611, 10453, 11381, 11384, 17772, 18560, 18965, 30349, 30351, 36775, 37204, 37633, 38559, 38560, 75764
Offset: 0

Views

Author

Alex Ratushnyak, Aug 14 2012

Keywords

Comments

Same formula, seed {0,1} : 0, 1, 1, 2, 3, 4, 6, 9, 15, 15, 19, 22, 31, 46, 48, 49, 49, 98, 144, 146, 149, 298, 396, 792, 823, 921, 1019, 1021, 1043, 1049, 1841, 2860
Same formula, seed {1,2} : 1, 2, 4, 8, 9, 17, 25, 33, 35, 60, 77, 94, 111, 119, 238, 476, 714, 715, 826, 937, 962, 1081, 1795, 1796, 2733, 3814, 3822, 3855, 4093, 7948

Crossrefs

Cf. A215488.

Programs

  • Mathematica
    Fold[Append[#1, #1[[-1]] + #1[[1 + Mod[#1[[-2]], #2]]]] &, {1, 1}, Range[2, 49]] (* Ivan Neretin, Sep 07 2017 *)
  • Python
    a = [1]*1000
    for n in range(2,77):
      print(a[n-2],end=', ')
      a[n] = a[n-1] + a[a[n-2] % n]
    # Corrected by Derek Orr, Sep 25 2014

Formula

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