login
Lexicographically earliest sequence of distinct positive integers such that if m and n are distinct and not coprime, then a(n) does not belong to the interval ceiling(a(m)/2)..2*a(m).
2

%I #10 Jun 22 2022 13:48:49

%S 1,2,3,5,4,11,6,23,24,47,7,95,8,191,192,383,9,767,10,1535,1536,3071,

%T 12,6143,3072,12287,12288,24575,13,49151,14,98303,98304,196607,98305,

%U 393215,15,786431,786432,1572863,16,3145727,17,6291455,6291456,12582911,18

%N Lexicographically earliest sequence of distinct positive integers such that if m and n are distinct and not coprime, then a(n) does not belong to the interval ceiling(a(m)/2)..2*a(m).

%C This sequence is a permutation of the nonnegative integers (when n is prime, a(n) is the least value not yet in the sequence).

%C The inverse sequence (A355066) has similarities with the Two-Up sequence (A090252) as A355066(n) is coprime to the next n terms (and to the floor(n/2) previous terms).

%C Note that the relation "u does not belong to the interval ceiling(v/2)..2*v" is symmetrical (for u, v > 0).

%H Rémy Sigrist, <a href="/A355065/a355065.gp.txt">PARI program</a>

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

%e The first terms, alongside the forbidden values, are:

%e n a(n) Forbidden values

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

%e 1 1 None

%e 2 2 None

%e 3 3 None

%e 4 5 1..4 (from m=2)

%e 5 4 None

%e 6 11 1..4 (from m=2), 2..6 (from m=3), 3..10 (from m=4)

%e 7 6 None

%e 8 23 1..4 (from m=2), 3..10 (from m=4), 6..22 (from m=6)

%e 9 24 2..6 (from m=3), 6..22 (from m=6)

%e 10 47 1..4 (from m=2), 3..10 (from m=4), 2..8 (from m=5),

%e 6..22 (from m=6), 12..46 (from m=8)

%e 11 7 None

%o (PARI) See Links section.

%Y Cf. A090252, A355066 (inverse).

%K nonn

%O 1,2

%A _Rémy Sigrist_, Jun 17 2022