A381419 a(1) = 1; for n > 1, a(n) is the smallest unused positive number that is coprime to a(n-1) and has a different binary weight than a(n-1).
1, 3, 2, 5, 4, 7, 6, 11, 8, 9, 13, 10, 19, 12, 23, 14, 15, 16, 17, 21, 20, 27, 22, 29, 18, 25, 24, 31, 26, 33, 28, 39, 32, 35, 34, 37, 30, 41, 36, 43, 38, 45, 44, 47, 40, 49, 46, 55, 42, 53, 48, 59, 50, 51, 52, 57, 56, 61, 54, 65, 58, 63, 62, 67, 60, 73, 64, 69, 68, 71, 66, 79, 70, 83
Offset: 1
Examples
a(4) = 5 as a(3) = 2 which is coprime to 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 2 (10_2) is 1.
Links
Programs
-
PARI
lista(n)= my(r=List([1]), p=1, q=p, t); while(p
p+1, forstep(i=q, p+2, -1, r[i]=r[i-1]); r[p+1]=t); q=p++)); Vec(r[1..n]); \\ Ruud H.G. van Tol, Mar 10 2025
Comments