OFFSET
1,1
COMMENTS
The first differences could be related to A004641. (From Bradley Klee via Seqfan list.)
The first differences appear to always be 4 or 6. The relationship A363406(n) - A363406(n-1) = 6 iff A004641(n-1) = 1 first fails at n = 50. - Michael S. Branicky, Dec 20 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
Starting with L = 1,2,3,4,..., the values of j, k, and a(n) are computed (and L is updated) as follows:
n j k a(n) L
= = = ==== ======================================================
- - - - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
1 1 2 3 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
2 3 6 9 4,5, 7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
3 4 9 13 5, 7,8, 10,11,12,13,14,15,16,17,18,19,20,...
4 5 12 17 7,8, 10,11, 13,14,15,16,17,18,19,20,...
5 7 16 23 8, 10,11, 13,14,15, 17,18,19,20,...
6 8 19 27 10,11, 13,14,15, 17,18, 20,...
PROG
(MATLAB)
function a = A363406( max_n )
L = [1:max_n+2];
for n = 1:max_n
a(n) = L(1) + L(L(1)+1); l = L(end);
L = [L(2:L(1)) L(L(1)+2:end)];
L = [L 1+l:1+l+L(1)];
end
end % Thomas Scheuerle, Jun 01 2023
(Python)
from itertools import islice
def agen(): # generator of terms
L = list(range(1, 10))
while True:
j = L[0]
k = L[j]
yield j + k # an
L.remove(j)
L.remove(k)
L.extend(list(range(L[-1]+1, L[-1]+7)))
print(list(islice(agen(), 62))) # Michael S. Branicky, Dec 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ali Sada and David James Sycamore, May 31 2023
STATUS
approved