OFFSET

1,2

COMMENTS

The long term behavior of the terms is dominated by the appearance of the Mersenne primes. This is due to composite numbers appearing which are 1 less than a power of 2, i.e., their binary representation consists of all 1's. Therefore the next term must be 1 less than the next power of 2 to satisfy (a(n-1) AND a(n)) = a(n-1). This pattern repeats until such a number is prime, i.e., a Mersenne prime, at which point the next term will be 1 more than this prime, after which the terms can eventually return to smaller values.

Due to the above behavior it is unknown if all numbers eventually appear, but assuming the number of Mersenne primes is infinite, it is likely all eventually will. In the first 100 terms the fixed points are 1, 71, 463, although more likely exist.

LINKS

Scott R. Shannon, Table of n, a(n) for n = 1..1100

EXAMPLE

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.

CROSSREFS

KEYWORD

nonn

AUTHOR

Scott R. Shannon, Aug 30 2024

STATUS

approved