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.

A363447 a(0) = 0; a(n) = a(a(n-1))-1 mod (n+1) for all n >= 1.

Original entry on oeis.org

0, 1, 0, 3, 2, 5, 4, 1, 0, 9, 8, 11, 10, 7, 0, 15, 14, 17, 16, 13, 6, 3, 2, 23, 22, 1, 0, 27, 26, 29, 28, 25, 0, 33, 32, 35, 34, 31, 24, 21, 2, 41, 40, 1, 0, 45, 44, 47, 46, 43, 0, 51, 50, 53, 52, 49, 42, 39, 20, 5, 4, 1, 0, 63, 62, 65, 64, 61, 0, 69, 68, 71
Offset: 0

Views

Author

Curtis Bechtel, Jun 02 2023

Keywords

Comments

Question: Does every nonnegative integer appear in the sequence? Furthermore, does every nonnegative integer appear an infinite number of times?

Examples

			For n = 1, we have a(1) = a(a(0))-1 mod 2 = a(0)-1 mod 2 = 0-1 mod 2 = 1.
For n = 20, assume we already know that a(19) = 13 and a(13) = 7. Then a(20) = a(a(19))-1 mod 21 = a(13)-1 mod 21 = 6.
For n = 23, assume we already know that a(22) = 2 and a(2) = 0. Then a(23) = a(a(22))-1 mod 24 = a(2)-1 mod 24 = -1 mod 24 = 23.
		

Crossrefs

Programs

  • Mathematica
    a[0]:=0; a[n_]:=a[n]=Mod[a[a[n-1]]-1, n+1]; Array[a,72,0]
  • Python
    a = [0]
    for i in range(1, 100):
        a.append((a[a[i - 1]] - 1) % (i + 1))
Showing 1-1 of 1 results.