login
Lexicographically earliest sequence of distinct positive terms such that for any n > 0, G(n) <> G(a(n)) (where G denotes the Golomb's sequence A001462).
2

%I #14 Feb 01 2019 01:20:53

%S 2,1,4,3,6,5,9,10,7,8,12,11,16,17,18,13,14,15,20,19,24,25,26,21,22,23,

%T 29,30,27,28,34,35,36,31,32,33,39,40,37,38,45,46,47,48,41,42,43,44,51,

%U 52,49,50,57,58,59,60,53,54,55,56,63,64,61,62,70,71,72

%N Lexicographically earliest sequence of distinct positive terms such that for any n > 0, G(n) <> G(a(n)) (where G denotes the Golomb's sequence A001462).

%C This sequence is a self-inverse permutation of the natural numbers.

%C For any n > 0, let b(n) = a(n) - n; the sequence b is unbounded.

%H Rémy Sigrist, <a href="/A306230/b306230.txt">Table of n, a(n) for n = 1..1000</a>

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

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e The first terms of the sequence, alongside G, are:

%e n a(n) G(n)

%e -- ---- ----

%e 1 2 1

%e 2 1 2

%e 3 4 2

%e 4 3 3

%e 5 6 3

%e 6 5 4

%e 7 9 4

%e 8 10 4

%e 9 7 5

%e 10 8 5

%e 11 12 5

%e 12 11 6

%e 13 16 6

%e 14 17 6

%e 15 18 6

%e 16 13 7

%e 17 14 7

%e 18 15 7

%e 19 20 7

%e 20 19 8

%o (PARI) See Links section.

%Y See A306229 for a similar sequence.

%Y Cf. A001462.

%K nonn

%O 1,1

%A _Rémy Sigrist_, Jan 30 2019