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.

A364784 a(n) = n for n <= 2. Thereafter if a(n-1) is a novel term, a(n) = a(a(k)) where k is the greatest prior term < a(n-1); otherwise, a(n) = number of times a(n-1) has been repeated.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 3, 2, 2, 3, 1, 4, 1, 5, 1, 6, 2, 4, 1, 7, 1, 8, 3, 2, 5, 1, 9, 2, 6, 1, 10, 2, 7, 1, 11, 3, 3, 4, 2, 8, 1, 12, 1, 13, 4, 3, 5, 2, 9, 1, 14, 1, 15, 5, 3, 6, 2, 10, 1, 16, 1, 17, 6, 3, 7, 2, 11, 1, 18, 2, 12, 1, 19, 4, 4, 5, 4, 6, 4, 7, 3, 8, 2
Offset: 1

Views

Author

David James Sycamore, Aug 07 2023

Keywords

Comments

The definition is similar to that of A364749.
With the exception of a(3) = a(4) = 1, every term a(r-1) = 1 occurs prior to record term a(r), and a(r) is the number of times 1 has been repeated so far.
The subsequence of records is A000027, and the subsequence {a(r)} is a copy of the sequence itself, which is fractal (see Example).

Examples

			The given terms are a(1) = 1 and a(2) = 2. Since 2 is a novel term and 1 is the greatest prior term < 2, a(3) = a(1) = 1, and since a(3) is the second occurrence of 1, a(4) = 1 (the number of times 1 has been repeated). Now 1 has occurred 3 times so a(5) = 2, and so on.
The sequence can be represented as an irregular table in which the n-th row starts with the n-th record, and ends with the term = 1 which precedes the next record. Thus the first column is A000027, and the second column is the sequence itself.
The table begins:
  1;
  2,1,1,2,1;
  3,2,2,3,1;
  4,1;
  5,1;
  6,2,4,1;
  7,1;
  8,3,2,5,1;
  9,2,6,1;
  10,2,7,1;
  11,3,3,4,2,8,1;
  12,1;
  13,4,3,5,2,9,1;
		

Crossrefs

Programs

Extensions

More terms from Michael De Vlieger, Aug 07 2023

A384773 a(1) = 1, a(2) = 1. For n > 2 if a(n-1) = k is a novel term, a(n) = a(n-1-k). Otherwise if a(n-1) is a repeat term a(n) = number of m; 1 <= m <= n-2 such that a(m) = a(n-1).

Original entry on oeis.org

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

Views

Author

David James Sycamore, Jun 09 2025

Keywords

Comments

a(n) <= n for all n, with equality for n = 1. Same as A364749 until a(12).
The sequence of indices of terms a(n-1-k) following novel terms k (starting: 2,3,4,6,8,10,11,13,...) appears to be A335999.
Records subsequence is A000027, with records occurring at indices 1, A026278.

Examples

			a(1) = a(2) = 1 implies a(3) = 1 since 1 has been repeated once. Then a(4) = 2 because now 1 has been repeated twice. Since 2 is a novel term a(5) = a(4-2) = a(2) = 1. Since 1 has been repeated three times a(6) = 3, another novel term so a(7) = a(6-3) = a(3) = 1.
		

Crossrefs

Programs

Showing 1-2 of 2 results.