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.

A380079 Start with a list of the positive integers L in increasing order. Then, at turn n>=1, element n jumps from its current position, m, to position m+n. Then a(n) = L(m+1).

Original entry on oeis.org

2, 1, 2, 5, 3, 7, 4, 5, 10, 6, 7, 13, 8, 15, 9, 10, 18, 11, 20, 12, 13, 23, 14, 15, 26, 16, 28, 17, 18, 31, 19, 20, 34, 21, 36, 22, 23, 39, 24, 41, 25, 26, 44, 27, 28, 47, 29, 49, 30, 31, 52, 32, 54, 33, 34, 57, 35, 36, 60, 37, 62, 38, 39, 65, 40, 41, 68, 42, 70, 43, 44, 73, 45, 75
Offset: 1

Views

Author

Ali Sada and David Nacin, Jan 11 2025

Keywords

Comments

It appears that a(n)=n+1 exactly when n belongs to A003622. For all other positions, fill in the numbers 1,2,3,4, ... in increasing order. A proof should be possible using the theorem-prover Walnut, and is underway. - Jeffrey Shallit, Jan 12 2025
After infinitely many moves, the natural numbers are transformed back into their original order. This is because all numbers larger than n must jump over n, as they have a larger jump by definition. Therefore, n must return to its original place in the list. It appears that n returns to its place at A022342(n-1).
There seems to be an infinite number of ordered pairs of the form (k, k+1) such as (1,2), (4,5), (6,7), (9,10), (12,13), .. etc., and the first term in each pair is A003622.
Also, it seems that if we take the last number in the jump (i.e. L(m+n-1), we get natural numbers excluding the terms of A003622, which seems to be A022342.
The last appearance of k also seems to be A022342.
The graph has two "rays", one with slope ~ 1 on which lies about every third term, and one with slope 0.618 on which lie the other terms. - M. F. Hasler, May 09 2025

Examples

			We start with 1,2,3,4,5,6,7,8,9,10... First, 1 jumps over 2, so, a(1) = 2. In the second turn, 2 jumps over 1 and 3, so, a(2) =1. In the third turn, 3 jumps over 2,4, and 5, so a(3) = 2. And so on.
		

Crossrefs

Programs

  • Python
    M = list()
    def moves(n, L):
        if n == 0:
            return L
        return move(n, moves(n-1,L))
    def move(n, L):
        pos = L.index(n)
        M.append(L[pos+1])
        return L[:pos]+L[pos+1:pos+n+1]+[n]+L[pos+n+1:]
    def seq(n):
        return moves(n, list(range(1,5*n)))
    seq(74)
    print(M) # David Nacin via Seqfan, Jan 10 2025
    
  • Python
    def aupton(nn):
        L, out = list(range(1, 2*nn+2)), []
        for n in range(1, nn+1):
            m = L.index(n)
            out.append(L[m+1])
            L.insert(m+n+1, n)
            L.pop(m)
        return out
    print(aupton(74)) # Michael S. Branicky, Jan 13 2025

Formula

From Jeffrey Shallit, Jan 13 2025: (Start)
If n belongs to A003622, then a(n) = n+1. Otherwise, a(A022342(n)) = n-1 for n >= 1. This can be proved with the Walnut theorem prover.
Alternatively, let g = (1+sqrt(5))/2, and let p be the fractional part of (n+1)*g. If p < 2-g, then a(n) = n+1. If p > 2-g, then a(n) = floor((n+1)/g). (End)