login
Primes of the form (p-1)^3/8 + (p+1)^2/4 where p is prime.
8

%I #18 Oct 05 2018 14:58:07

%S 5,17,43,593,829,2969,3631,12743,27961,44171,60919,127601,278981,

%T 578843,737281,950993,980299,1455893,1969001,2424329,2763881,3605293,

%U 5767739,7801993,9305521,11290049,12220361,12704093,16452089,22987529,35720189

%N Primes of the form (p-1)^3/8 + (p+1)^2/4 where p is prime.

%H G. C. Greubel, <a href="/A163424/b163424.txt">Table of n, a(n) for n = 1..1100</a>

%e (3-1)^3/8 + (3+1)^2/4 = 1 + 4 = 5;

%e (5-1)^3/8 + (5+1)^2/4 = 8 + 9 = 17;

%e (7-1)^3/8 + (7+1)^2/4 = 27 + 16 = 43.

%t f[n_]:=((p-1)/2)^3+((p+1)/2)^2; lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,7!}];lst

%t Select[(#-1)^3/8+(#+1)^2/4&/@Prime[Range[150]],PrimeQ] (* _Harvey P. Dale_, Oct 05 2018 *)

%o (PARI) list(lim)=my(v=List(),t); forprime(p=3,, t=((p-1)/2)^3 + ((p+1)/2)^2; if(t>lim, break); if(isprime(t), listput(v,t))); Vec(v) \\ _Charles R Greathouse IV_, Dec 23 2016

%Y Subsequence of A100662.

%Y For the corresponding primes p, see A163425.

%Y Cf. A162652, A163418, A163419, A163420, A163421, A163422.

%K nonn,easy

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jul 27 2009