A127493 Indices k such that the coefficient [x^1] of the polynomial Product_{j=0..4} (x-prime(k+j)) is prime.
1, 5, 8, 9, 22, 29, 45, 49, 60, 69, 87, 89, 90, 107, 114, 124, 125, 131, 134, 138, 145, 156, 171, 183, 188, 191, 203, 204, 207, 212, 219, 255, 261, 290, 298, 303, 329, 330, 343, 344, 349, 354, 378, 397, 398, 400, 403, 454, 456, 466, 474, 515, 549, 560, 570, 578
Offset: 1
Keywords
Examples
For k=2, the polynomial is (x-3)*(x-5)*(x-7)*(x-11)*(x-13) = x^5-39*x^4+574*x^3-3954*x^2+12673*x-15015, where 12673 is not prime, so k=2 is not in the sequence. For k=5, the polynomial is x^5-83*x^4+2710*x^3-43490*x^2+342889*x-1062347, where 342889 is prime, so k=5 is in the sequence.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
isA127493 := proc(k) local x,j ; mul( x-ithprime(k+j),j=0..4) ; expand(%) ; isprime(coeff(%,x,1)) ; end proc: A127493 := proc(n) option remember ; if n = 1 then 1; else for a from procname(n-1)+1 do if isA127493(a) then return a; end if; end do: end if; end proc: seq(A127493(n),n=1..60) ; # R. J. Mathar, Apr 23 2023
-
Mathematica
a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 2]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3]Prime[x + 4])], AppendTo[a, x]], {x, 1, 1000}]; a
-
PARI
e4(v)=sum(i=1,#v-3, v[i]*sum(j=i+1,#v-2, v[j]*sum(k=j+1,#v-1, v[k]*vecsum(v[k+1..#v])))) pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v is(n,p=prime(n))=isprime(e4(pr(p,5))) v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 15 2015
Extensions
Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009
Comments