A381405 a(0) = 0; for n > 0, a(n) is the smallest unused number such that a(n) AND a(n-1) = 0, where AND is the binary AND operation, while the binary weight of a(n) does not equal that of a(n-1).
0, 1, 6, 8, 3, 4, 9, 2, 5, 16, 7, 24, 32, 10, 21, 34, 13, 18, 37, 64, 11, 20, 35, 12, 19, 36, 25, 66, 28, 33, 14, 17, 38, 65, 22, 40, 23, 72, 39, 80, 15, 48, 67, 60, 128, 26, 68, 27, 96, 29, 98, 129, 30, 97, 130, 41, 86, 136, 49, 78, 144, 42, 85, 138, 53, 74, 132, 43, 84, 139, 52, 75, 148, 99, 140, 51, 76, 147, 44, 83, 160, 31, 192, 45, 82, 141, 50, 77, 146, 101
Offset: 0
Examples
a(3) = 8 = 1000_2 as 8 is unused and a(2) = 6 = 110_2, and 1000_2 AND 110_2 = 0 while the binary weights of 8 and 6 are 1 and 2 respectively.
Links
- Scott R. Shannon, Table of n, a(n) for n = 0..10000
Comments