OFFSET
1,2
COMMENTS
A fifth-order polynomial with 5 roots which are the five consecutive primes from prime(k) onward is defined by product_{j=0..4} (x-prime(k+j)). The sequence is a catalog of the cases where the coefficient of its linear term is prime.
Indices k such that e4(prime(k), prime(k+1), ..., prime(k+4)) is prime, where e4 is the elementary symmetric polynomial summing all products of four variables. - Charles R Greathouse IV, Jun 15 2015
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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] 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
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Jan 16 2007
EXTENSIONS
Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009
STATUS
approved