A242231 Primes p of the form p^2 + q - 1 where p < q are consecutive primes.
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
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.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..6900
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 *)