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.

A368050 Main diagonal of the array where row n=0 lists the natural numbers and 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, 1, 2, 5, 6, 4, 5, 10, 11, 12, 8, 15, 16, 17, 11, 20, 21, 22, 14, 15, 26, 27, 17, 18, 31, 32, 33, 21, 36, 37, 38, 24, 41, 42, 43, 27, 28, 47, 48, 30, 31, 52, 53, 33, 34, 57, 58, 59, 37, 62, 63, 64, 40, 41, 68, 69, 43, 44, 73, 74, 46, 47, 78, 79, 80, 50, 83
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 09 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

Other parts of the array: A379739 (subdiagonal) and A367634 (descending antidiagonals).

Programs

  • Python
    from itertools import count
    def A368050_generator():
        x = [1]
        for n in count(1):
            yield x[n-1]
            i = x.index(n)
            if len(x) <= i+n: x.extend(range(len(x)+1,i+n+2))
            x[i:i+n] = x[i+1:i+n+1]
            x[i+n] = n # Pontus von Brömssen, Jan 15 2025

Formula

If a(n) >= n, then a(n) = floor((2*g-2)n + 1/2), where g = (1+sqrt(5))/2 is the golden ratio. If a(n) < n, then a(n) = floor((4-2*g)*n). There is a 6-state automaton (in the "links" section) that takes the Zeckendorf representation of n and accepts if and only if a(n) >= n. - Jeffrey Shallit, Jan 14 2025

Extensions

a(42)-a(67) from Pontus von Brömssen, Jan 15 2025