%I #10 Oct 18 2015 10:39:19
%S 3,5,7,11,19,23,37,41,47,53,67,67,71,73,83,97,101,113,127,127,137,137,
%T 157,181,193,193,199,223,223,229,233,241,307,311,331,337,353,373,379,
%U 397,421,433,457,467,487,487,503,547,557,563,563,577,599,607,613,613
%N Primes of the form (prime(n) + (-1)^n*3)/2.
%e The first five integers n at which (prime(n) + (-1)^n*3)/2 yields a prime are 2, 4, 7, 8 and 13, so
%e a(1) = (prime(2) + (-1)^2)/2 = (3 + 3)/2 = 3.
%e a(2) = (prime(4) + (-1)^4)/2 = (7 + 3)/2 = 5.
%e a(3) = (prime(7) + (-1)^7)/2 = (17 - 3)/2 = 7.
%e a(4) = (prime(8) + (-1)^8)/2 = (19 + 3)/2 = 11.
%e a(5) = (prime(13) + (-1)^13)/2 = (41 - 3)/2 = 19.
%p 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
%o (PARI) for(n=2, 1e3, if(isprime(k=(prime(n)+(-1)^n*3)/2), print1(k", "))) \\ _Altug Alkan_, Oct 18 2015
%Y Cf. A000040.
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Oct 01 2008
%E Corrected (337 inserted, 367 removed) by _R. J. Mathar_, May 01 2010
|