login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
2
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,2
COMMENTS
The terms form a pattern similar to that in A109812. In the first 250000 terms the fixed points are 1, 2, 3, 8, 3650, 50624, 203074. The sequence is conjectured to be a permutation of the positive integers.
LINKS
Scott R. Shannon, Image of the first 250000 terms. The green line is a(n) = n.
EXAMPLE
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.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Aug 30 2024
STATUS
approved