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.

A355080 Start with the positive integers. Term by term from left to right insert a copy of the current term x m steps further, where m is the number of times x has appeared.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 3, 3, 1, 3, 2, 4, 4, 3, 4, 1, 2, 4, 3, 5, 5, 1, 5, 4, 2, 5, 3, 6, 6, 4, 6, 5, 1, 6, 2, 3, 5, 6, 4, 7, 7, 1, 7, 2, 6, 7, 5, 3, 4, 7, 8, 8, 6, 8, 1, 5, 8, 7, 2, 3, 8, 6, 4, 7, 9, 9, 8, 9, 5, 1, 9, 2, 6, 8, 9, 7, 3, 4, 5, 9, 10, 10, 8, 10, 1, 7, 10, 6
Offset: 1

Views

Author

Thomas Scheuerle, Jun 18 2022

Keywords

Comments

We start with the sequence of positive integers 1, 2, 3, ... . We process number by number from left to right. If the number is found the first time in the sequence, we will place a copy of it directly after, by shifting the remaining part of the sequence to the right. If we have already seen this number m times, we will place a copy of this number after skipping m numbers on the right.
We could use the term ordinal instead of number here, as the numerical value itself is not important, only the ordering.
This sequence was inspired by sequence A354223 from Tamas Sandor Nagy, which shares the idea to start with a predefined sequence and to insert copies ahead of element-wise evaluation.
A mysterious constant C:
The indices where this sequence reaches the next greater number for the first time are roughly approximated by a parabola: a(floor(b+(1/C)*n^2)) = 1, 2, 3, ... .
a(k) approximates round(sqrt(C*k)) if we choose for k the indices where a new number appears the first time in this sequence.
For each number in this sequence the indices of the appearance can be roughly approximated by some polynomial b+(1/C)*n^2, where b is some individual constant for each number, but C always appears to be the same constant, known thus far to be 1.1738... . The author used the value of sqrt(2/u), where u is Soldner's constant, with very good results, but there is yet not any evidence known that Soldner's constant has any relation to this sequence. Can we estimate C more accurately? Can we find an expression or series to describe C?
Tamas Sandor Nagy noticed that the value 1 appears exactly once between the first appearances of any two consecutive record values. He further noticed that if we break this sequence up into an irregular triangle in which each record value starts a new row, we will observe columns (A000124) which show a progression with the row number. See example section for details.
The mean value of the rows mentioned above as a function of the row index r is approximately r/(Pi*log(2)^2) - 1/2.

Examples

			Step-by-step development of the sequence is as follows; the asterisk marks the actual term that will be processed:
* 1 was previously seen 0 times -> insert directly after.
1,2,3,4,5,6,7,8,9,10
1,1,2,3,4,5,6,7,8,9,10
  * 1 was previously seen once -> insert one later.
1,1,2,3,4,5,6,7,8,9,10
1,1,2,1,3,4,5,6,7,8,9,10
    * 2 was previously seen 0 times -> insert directly after.
1,1,2,1,3,4,5,6,7,8,9,10
1,1,2,2,1,3,4,5,6,7,8,9,10
      * 2 was previously seen once -> insert one later.
1,1,2,2,1,3,4,5,6,7,8,9,10
1,1,2,2,1,2,3,4,5,6,7,8,9,10
        * 1 was previously seen twice -> insert two later.
1,1,2,2,1,2,3,4,5,6,7,8,9,10
1,1,2,2,1,2,3,1,4,5,6,7,8,9,10
.
This sequence written as an irregular triangle:
*  *
1, 1     *
2, 2, 1, 2
3, 3, 1, 3, 2     *
4, 4, 3, 4, 1, 2, 4, 3
5, 5, 1, 5, 4, 2, 5, 3        *
6, 6, 4, 6, 5, 1, 6, 2, 3, 5, 6, 4
Each column below an asterisk shows a linear progression.
		

Crossrefs

Programs

  • MATLAB
    function a = A355080( max_n )
        a = 1:max_n;
        for n = 1:max_n
            j = length(find(a(1:n) == a(n)));
            a = [a(1:n+j-1) a(n) a(n+j:end)];
        end
        a = a(1:max_n);
    end

A357081 Leader at step n of the THROWBACK procedure (see definition in comments).

Original entry on oeis.org

3, 4, 5, 6, 3, 7, 4, 8, 3, 5, 9, 4, 3, 6, 10, 5, 3, 4, 7, 11, 3, 6, 4, 5, 3, 8, 12, 4, 3, 7, 5, 6, 3, 4, 9, 13, 3, 5, 4, 8, 3, 6, 7, 4, 3, 5, 10, 14, 3, 4, 6, 5, 3, 9, 4, 7, 3, 8, 5, 4, 3, 6, 11, 15, 3, 4, 5, 7, 3, 6, 4, 10, 3, 5, 8, 4, 3, 9, 6, 5, 3, 4, 7, 12, 3, 16, 4, 5, 3, 6, 8, 4, 3, 7, 5, 11, 3, 4, 6, 9
Offset: 0

Views

Author

Anthony M. Kozar Jr., Sep 08 2022

Keywords

Comments

The THROWBACK procedure: Start with the infinite sequence of natural numbers beginning with 3, that is 3, 4, 5, 6, 7, 8, ... The first number in the sequence at any step of the procedure is called the "leader". At each step, the leader is moved back in the sequence the number of places equal to its value.
It is conjectured that every number (n >= 3) appears an infinite number of times in this sequence.
The indices of records, ignoring the initial 3, appear to match A155167.
Every fourth term is 3. Values k > 3 occur at nonconstant intervals and the sequence of intervals for each k appears to be cyclic with a period of 3^(k-3). Ignoring the last value, the first 3^(k-3)-1 values of any of these cycles of intervals appear to be a palindrome. E.g., a(n)=5 for n=2,9,15,23,30,37,45,51,58,66,... The intervals between the 5's appear to repeat the pattern 7,6,8,7,7,8,6,7,8 and 7,6,8,7,7,8,6,7 is a palindrome.
Appears to be A087165 with every term incremented by 2. If so, then the recurrence a(n)=3 when n == 0 (mod 4), otherwise a(n) = a(n - ceiling(n/4)) + 1 holds. Also appears to be A087165 with every 1 and every 2 removed. See the comment by Benoit Cloitre on A087165 for another possible way to construct this sequence.
If every 3 is removed then the result appears to be the original sequence with every term incremented by 1.
If the THROWBACK procedure is performed on all natural numbers including 1 and 2, then the sequence of leaders appears to be A001511. Other initial values appear to produce similar patterns to this sequence.

Examples

			Before the first step, 3 is the leader, so a(0) = 3. In the first step, 3 is moved back 3 places giving the new sequence 4, 5, 6, 3, 7, 8, ..., so a(1) = 4.
		

Crossrefs

Cf. A354223, A355080. (Other variants of the THROWBACK procedure).

Programs

  • Python
    from collections import deque
    from itertools import count, islice
    def tgen(): yield from count(3) # generator of sequence to throwback
    def agen(): # generator of terms
        g = tgen()
        a = deque([next(g)])
        while True:
            leader = a.popleft()
            yield leader
            while leader > len(a): a.append(next(g))
            a.insert(leader, leader)
    print(list(islice(agen(), 100))) # Michael S. Branicky, Sep 11 2022

Formula

a(n) = A087165(n+1) + 2 (conjectured).
Showing 1-2 of 2 results.