A381420 a(1) = 1, a(2) = 3; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) and has a different binary weight than a(n-1).
1, 3, 15, 5, 25, 10, 2, 6, 4, 12, 8, 14, 16, 18, 21, 9, 27, 24, 22, 20, 26, 30, 28, 32, 34, 38, 36, 39, 13, 65, 35, 40, 42, 33, 11, 55, 44, 46, 48, 45, 50, 54, 52, 58, 56, 60, 62, 64, 66, 51, 17, 85, 68, 70, 63, 7, 77, 49, 91, 78, 69, 23, 115, 75, 72, 57, 19, 95, 76, 80, 74, 86, 82, 90
Offset: 1
Examples
a(4) = 5 as a(3) = 15 which shares a factor with 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 15 (1111_2) is 4.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..10000
- Scott R. Shannon, Image of the first 100000 terms. The green line is a(n) = n.
Programs
-
PARI
lista(n)= my(i=1, j=0, r=Vec([1], n), s=List(), u=1); while(i
Ruud H.G. van Tol, Mar 10 2025
Comments