cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A375235 Records of A112591.

Original entry on oeis.org

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

Views

Author

Bill McEachen, Aug 06 2024

Keywords

Comments

Sequence closely parallel to A000295.

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).
		

Crossrefs

Cf. A000295, A014210 (primes where records occur), A014234, A112591.

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) ))

Formula

a(n) = previous_prime(2^n) XOR next_prime(2^n) = A112591(A014234(n)) for n > 1.

Extensions

More terms from Amiram Eldar, Aug 06 2024