login
A291603
Lexicographically earliest sequence of distinct positive terms such that for any n > 0, a(n) is coprime to a(2*n) and to a(2*n+1).
5
1, 2, 3, 5, 7, 4, 8, 6, 9, 10, 11, 13, 15, 17, 19, 23, 25, 14, 16, 21, 27, 12, 18, 20, 22, 26, 28, 24, 29, 30, 31, 32, 33, 34, 36, 37, 39, 35, 41, 38, 40, 43, 44, 47, 49, 53, 55, 51, 57, 45, 59, 61, 63, 65, 67, 71, 73, 42, 46, 77, 79, 48, 50, 69, 75, 52, 56
OFFSET
1,2
COMMENTS
This sequence has connections with A082746: here a(n) is coprime to a(2*n) and to a(2*n+1), there a(n) is coprime to a(2*n).
This sequence is a permutation of the natural numbers (with inverse A291604 and fixed points A291610):
- the sequence can always be extended with a prime number,
- all prime numbers appear in the sequence, in increasing order,
- for any n, there are infinitely many prime numbers coprime to n, so eventually n will appear in the sequence.
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing records in red and local minima in blue, highlighting primes in green and other prime powers in gold.
EXAMPLE
a(1) = 1 is suitable.
a(2) must be coprime to a(1) = 1.
a(2) = 2 is suitable.
a(3) must be coprime to a(1) = 1.
a(3) = 3 is suitable.
a(4) must be coprime to a(2) = 2.
a(4) = 5 is suitable.
a(5) must be coprime to a(2) = 2.
a(5) = 7 is suitable.
a(6) must be coprime to a(3) = 3.
a(6) = 4 is suitable.
a(7) must be coprime to a(3) = 3.
a(7) = 8 is suitable.
a(8) must be coprime to a(4) = 5.
a(8) = 6 is suitable.
a(9) must be coprime to a(4) = 5.
a(9) = 9 is suitable.
a(10) must be coprime to a(5) = 7.
a(10) = 10 is suitable.
MATHEMATICA
nn = 67; c[_] = False; Set[{a[1], c[1]}, {1, True}]; u = 2; Do[Set[{j, k}, {a[Floor[n/2]], u}]; While[Nand[! c[k], CoprimeQ[j, k]], k++]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 28 2022 *)
PROG
(PARI) \\ See Links section.
CROSSREFS
Cf. A082746, A291604 (inverse), A291610 (fixed points).
Sequence in context: A082196 A292876 A126049 * A082331 A140528 A065037
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Aug 27 2017
STATUS
approved