OFFSET
1,3
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 1..10000
Jeffrey Shallit, Automaton that decides whether a(n) >= n
Jeffrey Shallit, The Hurt-Sada Array and Zeckendorf Representations, arXiv:2501.08823 [math.NT], 2025. See pp. 2, 12.
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
EXAMPLE
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, ...
...
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Dec 09 2023
EXTENSIONS
a(42)-a(67) from Pontus von Brömssen, Jan 15 2025
STATUS
approved