Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Dec 16 2023 13:10:45
%S 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,
%T 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,
%U 12,19,35,6,41,23,18,1,43,10,47,11,26,21,53,4,49,25
%N 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).
%C This sequence has similarities with Stern's diatomic series (A002487) as it equals its even bisection and two consecutive terms are always coprime.
%C For any prime number p, p is the first multiple of p to appear in the sequence.
%C All prime numbers appear in the sequence, in natural order.
%C Will every positive integer appear?
%H Rémy Sigrist, <a href="/A368071/b368071.txt">Table of n, a(n) for n = 1..8192</a>
%H Rémy Sigrist, <a href="/A368071/a368071.gp.txt">PARI program</a>
%F gcd(a(n), a(n+1)) = 1.
%e a(1) = 1 by definition.
%e a(2) = a(1) = 1.
%e a(3) must be coprime to a(1) = 1 and a(2) = 1; we chose a(3) = 2.
%e a(4) = a(2) = 1.
%e a(5) must be coprime to a(2) = 1 and a(3) = 2; we chose a(5) = 3.
%e a(6) = a(3) = 2.
%e a(7) must be coprime to a(3) = 2 and a(4) = 1; we chose a(7) = 5.
%o (PARI) See Links section.
%Y Cf. A002487, A368147.
%K nonn
%O 1,3
%A _Rémy Sigrist_, Dec 10 2023