login
Indices k such that the coefficient [x^1] of the polynomial product_{j=0..4} (x-prime(k+j)) is prime.
1

%I #18 Apr 23 2023 14:30:32

%S 1,5,8,9,22,29,45,49,60,69,87,89,90,107,114,124,125,131,134,138,145,

%T 156,171,183,188,191,203,204,207,212,219,255,261,290,298,303,329,330,

%U 343,344,349,354,378,397,398,400,403,454,456,466,474,515,549,560,570,578

%N Indices k such that the coefficient [x^1] of the polynomial product_{j=0..4} (x-prime(k+j)) is prime.

%C 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.

%C 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

%H Charles R Greathouse IV, <a href="/A127493/b127493.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%e 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.

%p isA127493 := proc(k)

%p local x,j ;

%p mul( x-ithprime(k+j),j=0..4) ;

%p expand(%) ;

%p isprime(coeff(%,x,1)) ;

%p end proc:

%p A127493 := proc(n)

%p option remember ;

%p if n = 1 then

%p 1;

%p else

%p for a from procname(n-1)+1 do

%p if isA127493(a) then

%p return a;

%p end if;

%p end do:

%p end if;

%p end proc:

%p seq(A127493(n),n=1..60) ; # _R. J. Mathar_, Apr 23 2023

%t 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

%o (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]))))

%o pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v

%o is(n,p=prime(n))=isprime(e4(pr(p,5)))

%o v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ _Charles R Greathouse IV_, Jun 15 2015

%Y Cf. A001043, A034961, A034963, A034964, A127333-A127343, A127345-A127351, A037171, A034962, A034965, A082246, A082251, A070934, A006094, A046301-A046303, A046324-A046327, A127489, A127491, A127492, A024449.

%K nonn

%O 1,2

%A _Artur Jasinski_, Jan 16 2007

%E Definition and comment rephrased and examples added by _R. J. Mathar_, Oct 01 2009