login
Lexicographically earliest sequence of positive terms, such that each value, say v, appears three times at indices k, k + v and k + 2*v for some k.
3

%I #15 Apr 23 2019 02:15:30

%S 1,1,1,2,4,2,5,2,4,6,7,5,4,9,11,6,5,7,8,10,12,6,9,14,7,11,8,3,13,10,3,

%T 9,12,3,8,15,11,14,17,10,18,13,19,16,12,21,22,23,25,20,15,14,26,24,13,

%U 17,27,28,18,16,31,19,32,29,33,15,21,35,22,20,23,34

%N Lexicographically earliest sequence of positive terms, such that each value, say v, appears three times at indices k, k + v and k + 2*v for some k.

%C This sequence is a variant of A026242 where each value, say v, appears twice at indices k and k + v for some k.

%C Graphically, we have three lines.

%C Apparently every positive integer appears in the sequence.

%H Rémy Sigrist, <a href="/A307664/b307664.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A307664/a307664.gp.txt">PARI program for A307664</a>

%e For n = 1:

%e - we can set a(1) = a(2) = a(3) = 1.

%e For n = 4:

%e - we can set a(4) = a(6) = a(8) = 2.

%e For n = 5:

%e - a(8) is already known, hence a(5) <> 3,

%e - we can set a(5) = a(9) = a(13) = 4.

%o (PARI) See Links section.

%Y See A307667 and A307669 for other variants.

%Y Cf. A026242.

%K nonn

%O 1,4

%A _Rémy Sigrist_, Apr 20 2019