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
Rémy Sigrist, Table of n, a(n) for n = 1..10000
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.
Rémy Sigrist, Scatterplot of the first 10000 terms
Rémy Sigrist, PARI program for A291603
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
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Aug 27 2017
STATUS
approved