login
A363406
Start with list L = 1,2,3,4,.... For n = 1,2,3,..., iterate as follows: let j = L(1) and k = L(j+1), get a(n) = j + k, and remove j and k from L.
1
3, 9, 13, 17, 23, 27, 33, 37, 43, 47, 51, 57, 61, 67, 71, 75, 81, 85, 91, 95, 99, 105, 109, 115, 119, 125, 129, 133, 139, 143, 149, 153, 157, 163, 167, 173, 177, 183, 187, 191, 197, 201, 207, 211, 215, 221, 225, 231, 235, 241, 245, 249, 255, 259, 265, 269, 273, 279, 283, 289, 293, 297
OFFSET
1,1
COMMENTS
The first differences could be related to A004641. (From Bradley Klee via Seqfan list.)
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
CROSSREFS
Cf. A004641.
Sequence in context: A345460 A239320 A243656 * A240108 A163595 A088090
KEYWORD
nonn
AUTHOR
STATUS
approved