OFFSET
1,1
EXAMPLE
The first five integers n at which (prime(n) + (-1)^n*3)/2 yields a prime are 2, 4, 7, 8 and 13, so
a(1) = (prime(2) + (-1)^2)/2 = (3 + 3)/2 = 3.
a(2) = (prime(4) + (-1)^4)/2 = (7 + 3)/2 = 5.
a(3) = (prime(7) + (-1)^7)/2 = (17 - 3)/2 = 7.
a(4) = (prime(8) + (-1)^8)/2 = (19 + 3)/2 = 11.
a(5) = (prime(13) + (-1)^13)/2 = (41 - 3)/2 = 19.
MAPLE
for n from 1 to 300 do p := ithprime(n) ; c := (p+3*(-1)^n)/2 ; if type(c, 'integer') then if isprime(c) then printf("%d, ", c) ; end if; end if; end do: # R. J. Mathar, May 01 2010
PROG
(PARI) for(n=2, 1e3, if(isprime(k=(prime(n)+(-1)^n*3)/2), print1(k", "))) \\ Altug Alkan, Oct 18 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Oct 01 2008
EXTENSIONS
Corrected (337 inserted, 367 removed) by R. J. Mathar, May 01 2010
STATUS
approved