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.

A350126 a(n) = (a(a(n-1)) mod 2) + a(n-2) with a(0) = 0 and a(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 4, 2, 5, 3, 5, 4, 5, 5, 6, 5, 7, 5, 8, 5, 9, 6, 9, 7, 9, 8, 9, 9, 10, 10, 11, 11, 12, 11, 13, 12, 13, 13, 14, 14, 15, 14, 16, 15, 16, 16, 17, 17, 18, 18, 19, 18, 20, 19, 20, 20, 21, 21, 22, 21, 23, 22, 23, 23, 24, 24, 25, 25, 26, 25, 27
Offset: 0

Views

Author

Jon Maiga, Dec 15 2021

Keywords

Comments

It appears that lim_{n->infinity} a(n)/n = 0.33960...
A similar formula is conjectured for A156253: (a(a(n-1)) mod 2) + a(n-2) + 1.

Crossrefs

Cf. A156253.

Programs

  • Mathematica
    a[0] = 0;
    a[1] = 1;
    a[n_] := a[n] = Mod[a[a[n - 1]], 2] + a[n - 2]
    Array[a, 100, 0]
  • Python
    a = [0, 1]
    [a.append(a[a[n-1]]%2 + a[n-2]) for n in range(2, 72)]
    print(a) # Michael S. Branicky, Dec 15 2021