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

A367634 Array read by descending antidiagonals, where row n=0 lists the natural numbers and where each new row n=1,2,... is found by taking the number n in the previous row, and "leaping" it over the next n terms to its right, keeping the other numbers fixed (see example).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Nov 25 2023

Keywords

Examples

			The array begins:
  1,  2,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  2,  1,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  3,  2,  4,  5,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  4,  5,  3,  6,  7,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  5,  3,  6,  7,  4,  8,  9,  10,  11,  12,  13,  ...
  1,  2,  3,  6,  7,  4,  8,  5,  9,  10,  11,  12,  13,  ...
  1,  2,  3,  7,  4,  8,  5,  9, 10,   6,  11,  12,  13,  ...
  1,  2,  3,  4,  8,  5,  9, 10,  6,  11,   7,  12,  13,  ...
  1,  2,  3,  4,  5,  9, 10,  6, 11,   7,  12,  13,   8,  ...
  1,  2,  3,  4,  5, 10,  6, 11,  7,  12,  13,   8,  14,  ...
  1,  2,  3,  4,  5,  6, 11,  7, 12,  13,   8,  14,  15,  ...
  1,  2,  3,  4,  5,  6,  7, 12, 13,   8,  14,  15,   9,  ...
  1,  2,  3,  4,  5,  6,  7, 13,  8,  14,  15,   9,  16,  ...
  ...
		

Crossrefs

A379739 Subdiagonal of the Hurt-Sada array.

Original entry on oeis.org

2, 3, 4, 3, 7, 8, 9, 6, 7, 13, 14, 9, 10, 18, 19, 12, 13, 23, 24, 25, 16, 28, 29, 30, 19, 20, 34, 35, 22, 23, 39, 40, 25, 26, 44, 45, 46, 29, 49, 50, 51, 32, 54, 55, 56, 35, 36, 60, 61, 38, 39, 65, 66, 67, 42, 70, 71, 72, 45, 75, 76, 77, 48, 49, 81, 82, 51
Offset: 1

Views

Author

Jeffrey Shallit, Jan 14 2025

Keywords

Comments

The array is depicted in A368050.

Crossrefs

Programs

  • PARI
    zeckendorf(n)=my(f1=1,f2=2,fibs=List([1]),rep=List(),i); while(f2<=n,listput(fibs,f2);[f1,f2]=[f2,f1+f2];); i=#fibs; while(i,if(fibs[i]>n, i--, listput(rep,1); n-=fibs[i]; if(i==1,break); i-=2); listput(rep,0)); Vec(rep)
    a(n)=my(g=quadgen(5), Z=zeckendorf(n), state=1, new0=[1, 3, 4, 6, 3, 8, 6, 8], new1=[2, 0, 5, 7, 0, 5, 0, 2]); for(i=1, #Z, state=if(Z[i], new1, new0)[state]); if(state!=5 && state!=8, 2*n/g+1, (4-2*g)*n + (5-3*g))\1 \\ Charles R Greathouse IV, Jan 14 2025

Formula

If a(n) < n, then a(n) = floor((4-2*g)n + (5-3*g)), where g = (1+sqrt(5))/2, the golden ratio. If a(n) >= n, then a(n) = floor((2*g-2)n) + 1. There is an 8-state automaton (see the links section) that takes the Zeckendorf representation of n as input and decides whether a(n) >= n.

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)

A380960 Sum of n and the n-th bit of the infinite Fibonacci word.

Original entry on oeis.org

0, 2, 2, 3, 5, 5, 7, 7, 8, 10, 10, 11, 13, 13, 15, 15, 16, 18, 18, 20, 20, 21, 23, 23, 24, 26, 26, 28, 28, 29, 31, 31, 32, 34, 34, 36, 36, 37, 39, 39, 41, 41, 42, 44, 44, 45, 47, 47, 49, 49, 50, 52, 52, 54, 54, 55, 57, 57, 58, 60, 60, 62, 62, 63, 65, 65, 66
Offset: 0

Views

Author

Jeffrey Shallit, Feb 09 2025

Keywords

Comments

Also the length of the "scrambled part" of the n-th row of the Hurt-Sada array (depicted in A368050). This is the portion of the n-th row whose i-th term differs from i. See Shallit (2025), Theorem 10.

Crossrefs

Formula

a(n) = A003849(n) + n.
Showing 1-4 of 4 results.