login
A368071
a(1) = 1, and for any n > 0, a(2*n) = a(n), a(2*n+1) is the least positive number not yet in the sequence coprime to a(n) and a(n+1).
2
1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 9, 5, 6, 1, 11, 4, 13, 3, 8, 7, 15, 2, 17, 9, 14, 5, 19, 6, 23, 1, 10, 11, 21, 4, 25, 13, 16, 3, 29, 8, 27, 7, 22, 15, 31, 2, 33, 17, 20, 9, 37, 14, 39, 5, 12, 19, 35, 6, 41, 23, 18, 1, 43, 10, 47, 11, 26, 21, 53, 4, 49, 25
OFFSET
1,3
COMMENTS
This sequence has similarities with Stern's diatomic series (A002487) as it equals its even bisection and two consecutive terms are always coprime.
For any prime number p, p is the first multiple of p to appear in the sequence.
All prime numbers appear in the sequence, in natural order.
Will every positive integer appear?
LINKS
Rémy Sigrist, PARI program
FORMULA
gcd(a(n), a(n+1)) = 1.
EXAMPLE
a(1) = 1 by definition.
a(2) = a(1) = 1.
a(3) must be coprime to a(1) = 1 and a(2) = 1; we chose a(3) = 2.
a(4) = a(2) = 1.
a(5) must be coprime to a(2) = 1 and a(3) = 2; we chose a(5) = 3.
a(6) = a(3) = 2.
a(7) must be coprime to a(3) = 2 and a(4) = 1; we chose a(7) = 5.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A280689 A352961 A116529 * A169747 A269380 A268674
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 10 2023
STATUS
approved