A375829 a(1) = 1; for n > 1, a(n) is the smallest unused positive number such that (a(n-1) AND a(n)) = 0 if a(n-1) is prime, otherwise (a(n-1) AND a(n)) = a(n-1), where AND is the binary AND operation.
1, 3, 4, 5, 2, 8, 9, 11, 16, 17, 6, 7, 24, 25, 27, 31, 32, 33, 35, 39, 47, 64, 65, 67, 12, 13, 18, 19, 36, 37, 10, 14, 15, 63, 127, 128, 129, 131, 20, 21, 23, 40, 41, 22, 30, 62, 126, 254, 255, 511, 1023, 2047, 4095, 8191, 8192, 8193, 8195, 8199, 8207, 8223, 8255, 8319, 8447, 256, 257, 26, 58, 59, 68, 69, 71, 48, 49, 51, 55, 119, 247, 503, 512, 513, 515, 519
Offset: 1
Keywords
Examples
a(7) = 9 as a(6) = 8 = 1000_2 is not prime, and ((9 = 1001_2) AND 1000_2) = 1000_2 = 8. a(9) = 16 as a(8) = 11 = 1011_2 is prime, and ((16 = 10000_2) AND 1011_2) = 0.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..1100
Comments