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.

User: Jack Kiuttu

Jack Kiuttu's wiki page.

Jack Kiuttu has authored 1 sequences.

A330615 a(0) = 1; a(1) = 1; a(n) = a(a(n - 1) mod n) + a(a(n - 2) mod n).

Original entry on oeis.org

1, 1, 2, 3, 5, 4, 9, 7, 8, 15, 12, 6, 10, 21, 19, 14, 22, 23, 9, 20, 16, 38, 44, 52, 21, 40, 57, 24, 22, 65, 48, 26, 79, 78, 18, 17, 32, 102, 136, 41, 23, 53, 58, 26, 76, 83, 150, 47, 56, 54, 14, 22, 63, 56, 17, 24, 44, 97, 117, 253, 118, 112, 58, 171, 143, 74
Offset: 0

Author

Jack Kiuttu, Dec 20 2019

Keywords

Comments

Periodic with period 63584 starting at n = 441329.

Examples

			n = 8: a(7) = 7, a(6) = 9, so a(8) = a(a(7) mod 8) + a(a(6) mod 8) = a(7 mod 8) + a(9 mod 8) = a(7) + a(1) = 7 + 1 = 8.
		

Crossrefs

Cf. A308818 (similar sequence with initial conditions a(0) = 2, a(1) = 3).

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = a[Mod[a[n-1], n]] + a[Mod[a[n-2], n]]; Array[a, 66, 0] (* Amiram Eldar, Dec 21 2019 *)
  • Python
    # Lists terms up to given n.
    def a_list(n):
       a=[1,1]
       for k in range(2,n+1):
          a.append(a[a[-1]%k]+a[a[-2]%k])
       return a