Sequence & Its Terms' Differences

Leroy Quet qqquet at
Sun Mar 9 01:55:09 CET 2003

In general, I am wondering if there are any known examples (ie. in the 
OEIS) of sequences which are permutations of the positive integers, and 
also the absolute-values of the differences between their adjacent terms 
also form permutations of the positive integers.

So, the {a(1),a(2),a(3),....} is a permutation of the positive integers 
(ie. the sequence is made of only positive integers, where each positive 
integer occurs once and only once somewhere in the sequence),
and the sequence {|a(2)-a(1)|,|a(3)-a(2)|,|a(4)-a(3)|,...} is also a 
permutation of the positive integers.


Specifically, does the following sequence (interesting either way) fall 
into the above category? (Also, the difference-sequence is interesting to 
me either way.)

a(1) = 1;

For m >= 2,
a(m) = lowest positive integer not in {a(1),a(2),...,a(m-1)} such that
|a(m) -a(m-1)| is a positive integer not in 

I get these sequences (calculated by hand...unsure of correctness):

a(k) ->     1, 2, 4, 7, 3, 8, 14, 5, 12, 20, 6,...

difference-> 1, 2, 3, 4, 5, 6, 9, 7, 8, 14,...

(Not apparently in the OEIS.)

Leroy Quet 

More information about the SeqFan mailing list