A375235 Records of A112591.
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
Keywords
Examples
The first term of A112591 = 1 is a record and is a(1). The next A112591 value > 1 is 6 which is a(2).
Programs
-
Mathematica
a[n_] := BitXor @@ NextPrime[2^n, {-1, 1}]; a[1] = 1; Array[a, 33] (* Amiram Eldar, Aug 08 2024 *)
-
PARI
a(n)= if(n==1,1,bitxor(precprime(2^n), nextprime(2^n) ))
Extensions
More terms from Amiram Eldar, Aug 06 2024
Comments