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.

A364197 a(n+1) = a(|n-a(n)^2|) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 3, 3, 2, 3, 1, 4, 2, 3, 3, 2, 5, 4, 2, 4, 3, 5, 3, 4, 4, 3, 6, 2, 5, 3, 4, 4, 3, 5, 3, 4, 5, 5, 3, 4, 5, 3, 4, 7, 4, 6, 4, 5, 4, 4, 6, 4, 5, 3, 5, 4, 5, 5, 4, 5, 4, 5, 6, 7, 4, 5, 6, 5, 5, 8, 2, 7, 4, 6, 6, 4, 6, 6, 4, 7, 5, 5, 6, 5, 5, 6, 5, 6, 5, 8, 4, 7, 5, 6, 6, 5, 3, 7, 5, 7
Offset: 0

Views

Author

Rok Cestnik, Jul 13 2023

Keywords

Examples

			a(1) = a(|0-a(0)^2|)+1 = a(|0-0|)+1 = a(0)+1 = 1.
a(2) = a(|1-a(1)^2|)+1 = a(|1-1|)+1 = a(0)+1 = 1.
a(3) = a(|2-a(2)^2|)+1 = a(|2-1|)+1 = a(1)+1 = 2.
a(4) = a(|3-a(3)^2|)+1 = a(|3-4|)+1 = a(1)+1 = 2.
a(5) = a(|4-a(4)^2|)+1 = a(|4-4|)+1 = a(0)+1 = 1.
		

Crossrefs

Cf. A364198 (indices of record highs).

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = a[Abs[n - 1 - a[n - 1]^2]] + 1; Array[a, 100, 0] (* Amiram Eldar, Jul 13 2023 *)
  • Python
    a = [0]; [a.append(a[abs(n-a[n]**2)]+1) for n in range(100)]

Formula

a(n) ~ (3n)^(1/3) (conjectured).