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.

A242231 Primes p of the form p^2 + q - 1 where p < q are consecutive primes.

Original entry on oeis.org

13, 31, 59, 307, 383, 557, 997, 1409, 1723, 3541, 5113, 5407, 6323, 6977, 8017, 10303, 19469, 52673, 94559, 109897, 151717, 158009, 187927, 193163, 249503, 274069, 326617, 361807, 383791, 419261, 427067, 546863, 573809, 592133, 636017, 684757, 735307, 738743
Offset: 1

Views

Author

K. D. Bajpai, May 08 2014

Keywords

Examples

			a(1) = 13 = 3^2 + 5 - 1: 13 is prime, 3 and 5 are consecutive primes.
a(2) = 31 = 5^2 + 7 - 1: 31 is prime, 5 and 7 are consecutive primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A242231:= proc()local k ; k:=(ithprime(x)^2+ithprime(x+1)-1);if  isprime(k) then RETURN (k); fi;end: seq(A242231 (),x=1..500);
  • Mathematica
    A242231 = {}; Do[p = Prime[n]^2 + Prime[n + 1] - 1; If[PrimeQ[p], AppendTo[A242231, p]], {n, 500}]; A242231
    Select[#[[1]]^2+#[[2]]-1&/@Partition[Prime[Range[250]],2,1],PrimeQ] (* Harvey P. Dale, Mar 05 2022 *)