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-2 of 2 results.

A364198 Index of first occurrence of n in A364197.

Original entry on oeis.org

0, 1, 3, 6, 11, 16, 26, 43, 69, 115, 141, 158, 208, 293, 358, 440, 541, 642, 743, 1117, 1378, 1612, 1826, 2052, 2494, 2856, 3181, 3703, 4107, 4862, 5347, 5924, 6454, 7645, 8322, 8999, 9784, 10941, 12458, 13580, 14542, 15839, 16864, 18309, 19876, 21696, 23311, 25408, 28377, 30314
Offset: 0

Views

Author

Rok Cestnik, Jul 13 2023

Keywords

Crossrefs

Cf. A364197.

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[Abs[n - 1 - s[n - 1]^2]] + 1; TakeWhile[Flatten[FirstPosition[Array[s, 32000, 0] , #] & /@ Range[0, 50]] - 1 , NumberQ] (* Amiram Eldar, Jul 13 2023 *)
  • Python
    a = [0]; [a.append(a[abs(n-a[n]**2)]+1) for n in range(1000)] # A364197
    b = [a.index(n) for n in range(max(a)+1)] # A364198

Formula

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

A364663 a(n+1) = a(|n-a(n)*a(n-1)|)+1; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Rok Cestnik, Aug 01 2023

Keywords

Comments

a(-1) can be set to any finite value and it does not affect the sequence.

Examples

			a(1) = a(|0-a(0)*____|)+1 = a(0)+1 = 1.
a(2) = a(|1-a(1)*a(0)|)+1 = a(1)+1 = 2.
a(3) = a(|2-a(2)*a(1)|)+1 = a(0)+1 = 1.
		

Crossrefs

Programs

  • PARI
    N=100; a=vector(N); a[2]=1; for(n=1,N-2,a[n+2]=a[1+abs(n-a[n]*a[n+1])]+1);
  • Python
    a=[0];
    for n in range(100):
        a.append(a[abs(n-a[n]*a[n-1])]+1)
    

Formula

a(n) ~ (3*n)^(1/3) (conjectured).
Showing 1-2 of 2 results.