%I #14 Mar 04 2014 05:11:30
%S 5,21,65,133,481,645,1541,2133,3201,3605,4033,5461,8965,12545,16725,
%T 17633,25761,31621,32865,40833,48133,52801,64533,69921,71765,79381,
%U 83333,125665,138245,151425,182533,191521,197633,226325,243105,246533,256961,260485,274821
%N p*(p+2)/3 where p and p+4 are primes.
%C For p>3, p == 1 mod 6 and p(p+2) == 0 mod 3, hence, except for the first term, a(n) = subsequence of A014641 Odd octagonal numbers: (2n+1)(6n+1).
%e p=3,p+4=7 are primes and a(1)=3*5/3=3,
%e p=7,p+4=11 are primes and a(2)=7*9/3=21=A014641(2),
%e p=13,p+4=17 are primes and a(3)=13*15/3=65=A014641(3).
%t # (# + 2)/3 & /@ Select[Prime@Range@140, PrimeQ[# + 4] &]
%o (PARI) {forprime (p=3,10^3,isprime(p+4)&print1(p*(p+2)/3,","))}
%Y Cf. A014641.
%K nonn
%O 1,1
%A _Zak Seidov_, Jan 23 2011
%E More terms from _Michel Marcus_, Mar 04 2014
|