OFFSET
1,1
COMMENTS
This sequence is union of primes of the form:
6t-1 such that 6t+1 and t are both prime,
6t-1 such that 6t+5 and 3t+1 are both prime and 6t+1 is composite,
6t+1 such that 6t+5 and 2t+1 are both prime,
6t+1 such that 6t+7 and 3t+2 are both prime and 6t+5 is composite.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
7 is a term since 11 is the next prime and (11^2 - 7^2)/24 = 3 is prime.
MAPLE
N:= 10000: # to get all terms <= N
Primes:= select(isprime, [seq(i, i=3..N, 2)]):
f:= proc(p, q)
local r;
r:= (q^2-p^2)/24;
if r::integer and isprime(r) then p fi
end proc:
seq(f(Primes[i], Primes[i+1]), i=1..nops(Primes)-1); # Robert Israel, Mar 10 2017
MATHEMATICA
Select[Prime@ Range@ 415, PrimeQ[(NextPrime[#]^2 - #^2)/24] &] (* Michael De Vlieger, Mar 13 2017 *)
PROG
(PARI) is(n) = n>3 && isprime(n) && isprime((nextprime(n+1)^2-n^2)/24);
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski and Altug Alkan, Mar 10 2017
STATUS
approved