OFFSET
1,2
COMMENTS
Subsequence of A174011: 4*prime(n)-+3 are both prime. - Michel Marcus, Apr 07 2014
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
EXAMPLE
a(1)=1 because 4*prime(1)-3=5=3rd prime and 4*prime(1)+3=11=5th prime;
a(2)=3 because 4*prime(3)-3=17=7th prime and 4*prime(3)+3=23=9th prime;
a(3)=5 because 4*prime(5)-3=41=13th prime and 4*prime(5)+3=47=15th prime;
a(4)=95 because 4*prime(95)-3=1993=301st prime and 4*prime(95)=3=1999=303rd prime.
MAPLE
N:= 1000: # to get a(1) to a(N)
p:= 0:
A:= NULL:
count:= 0:
for n from 1 while count < N do
p:= nextprime(p);
if isprime(4*p-3) and isprime(4*p+3) and (isprime(4*p-1) or isprime(4*p+1))
then count:= count+1; A:= A, n
fi
od:
A; # Robert Israel, Dec 20 2015
MATHEMATICA
Select[Range@ 10000, And[PrimeQ[4 Prime[#] - 3], PrimeQ[4 Prime[#] + 3], NextPrime[4 Prime[#] - 3] != 4 Prime[#] + 3] &] (* Michael De Vlieger, Dec 20 2015 *)
PROG
(PARI) isok(n) = isprime(pa=4*prime(n)-3) && isprime(pb=4*prime(n)+3) && (primepi(pb) - primepi(pa) != 1); \\ Michel Marcus, Apr 07 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Mar 05 2010
EXTENSIONS
Corrected (85 replaced by 95, 286 and 321 removed) and extended by R. J. Mathar, May 02 2010
More terms from Michel Marcus, Apr 07 2014
STATUS
approved