login
A375235
Records of A112591.
1
1, 6, 12, 28, 58, 126, 252, 506, 1012, 2042, 4082, 8190, 16366, 32742, 65518, 131056, 262114, 524280, 1048554, 2097146, 4194278, 8388594, 16777208, 33554390, 67108858, 134217716, 268435396, 536870852, 1073741814, 2147483614, 4294967284, 8589934580, 17179869158
OFFSET
1,2
COMMENTS
Sequence closely parallel to A000295.
FORMULA
a(n) = previous_prime(2^n) XOR next_prime(2^n) = A112591(A014234(n)) for n > 1.
EXAMPLE
The first term of A112591 = 1 is a record and is a(1). The next A112591 value > 1 is 6 which is a(2).
MATHEMATICA
a[n_] := BitXor @@ NextPrime[2^n, {-1, 1}]; a[1] = 1; Array[a, 33] (* Amiram Eldar, Aug 08 2024 *)
PROG
(PARI) a(n)= if(n==1, 1, bitxor(precprime(2^n), nextprime(2^n) ))
CROSSREFS
Cf. A000295, A014210 (primes where records occur), A014234, A112591.
Sequence in context: A146005 A325812 A323652 * A223346 A109510 A034715
KEYWORD
nonn
AUTHOR
Bill McEachen, Aug 06 2024
EXTENSIONS
More terms from Amiram Eldar, Aug 06 2024
STATUS
approved