[seqfan] Minimizing Q
Eric Angelini
Eric.Angelini at kntv.be
Tue Nov 11 11:10:13 CET 2014
S=1,0,3,2,5,6,7,4,9,12,11,10,13,14,15,8,17,24,19,18,21,22,23,16,...
Hello SeqFans,
a(1)=1
We now always extend S with the term
not yet present in S that minimizes Q.
Q is a quantity that must always be >0 .
Q is set to 1 with a(1)=1 and then Q evolves:
make Q+a(n) when the next a(n) is odd
and make Q-a(n) when the next a(n) is even.
Example:
S=1,... Q=1
S is extended with 0 as 0 minimizes Q
at that stage (Q-0=1):
S=1,0,... Q=1
S is extended with 3 as we cannot
extend it with 2 (if we do that, Q will
be negative, which is forbidden: Q-2=-1):
S=1,0,3,... Q=4
S is extended with 2 as 2 is the best
integer not yet present in S that minimizes Q:
S=1,0,3,2,... Q=2
S is extended with 5 as 5 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,... Q=7
S is extended with 6 as 6 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,6,... Q=1
S is extended with 7 as 7 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,6,7... Q=8
S is extended with 4 as 4 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,6,7,4,,... Q=4
S is extended with 9 as 9 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,6,7,4,9,,... Q=13
S is extended with 12 as 12 is the best integer not yet present in S that minimizes Q:
S=1,0,3,2,5,6,7,4,9,12,,... Q=1
Etc.
S is a permutation of the integers >0.
S seems not to be in the OEIS (nor Q).
Best,
É.
More information about the SeqFan
mailing list