OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Vieta's Formulas
FORMULA
a(n) = p(n)*p(n+1) + p(n)*p(n+2) + p(n)*p(n+3) + p(n+1)*p(n+2) + p(n+1)*p(n+3) + p(n+2)*p(n+3), where p(k) is the k-th prime (by Viete's formula relating the zeros and the coefficients of a polynomial). - Emeric Deutsch, Jan 20 2007
EXAMPLE
a(1)=101 because (x-2)*(x-3)*(x-5)*(x-7) = x^4 - 17x^3 + 101x^2 - 247x + 210.
MAPLE
a:=n->coeff(expand((x-ithprime(n))*(x-ithprime(n+1))*(x-ithprime(n+2))*(x-ithprime(n+3))), x, 2): seq(a(n), n=1..45); # Emeric Deutsch, Jan 20 2007
MATHEMATICA
Table[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x] Prime[x + 3] + Prime[x + 1] Prime[x + 2] + Prime[x + 1] Prime[x + 3] + Prime[x + 2] Prime[x + 3], {x, 1, 100}]
Total[Times@@@Subsets[#, {2}]]&/@Partition[Prime[Range[40]], 4, 1] (* Harvey P. Dale, Apr 15 2019 *)
PROG
(PARI) {m=35; k=3; for(n=1, m, print1(sum(i=n, n+k-1, sum(j=i+1, n+k, prime(i)*prime(j))), ", "))} \\ Klaus Brockhaus, Jan 21 2007
(PARI) {m=35; k=3; for(n=1, m, print1(abs(polcoeff(prod(j=0, k, (x-prime(n+j))), 2)), ", "))} \\ Klaus Brockhaus, Jan 21 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Jan 11 2007
EXTENSIONS
Edited by Emeric Deutsch and Klaus Brockhaus, Jan 20 2007
STATUS
approved