A375828 a(1) = 1; for n > 1, a(n) is the smallest unused positive number such that (a(n-1) AND a(n)) = a(n-1) if a(n-1) is prime, otherwise (a(n-1) AND a(n)) = 0, where AND is the binary AND operation.
1, 2, 3, 7, 15, 16, 4, 8, 5, 13, 29, 31, 63, 64, 6, 9, 18, 12, 17, 19, 23, 55, 72, 20, 10, 21, 32, 11, 27, 36, 24, 33, 14, 48, 65, 22, 40, 66, 25, 34, 28, 35, 68, 26, 37, 39, 80, 38, 73, 75, 52, 67, 71, 79, 95, 128, 30, 96, 129, 42, 69, 50, 76, 49, 70, 41, 43, 47, 111, 144, 44, 81, 46, 145, 74, 53, 61, 125, 130, 45, 82, 132, 51, 136, 54, 137, 139, 143, 112
Offset: 1
Keywords
Examples
a(5) = 15 as a(4) = 7 = 111_2 is prime, and ((15 = 1111_2) AND 111_2) = 111_2 = 7. a(6) = 16 as a(5) = 15 = 1111_2 is not prime, and ((16 = 10000_2) AND 1111_2) = 0.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..10000
- Scott R. Shannon, Image of the first 250000 terms. The green line is a(n) = n.
Comments