OFFSET
1,1
COMMENTS
a(n) = absolute value of coefficient of x^8 of the polynomial Product_{j=0..8}(x - prime(n+j)) of degree 9; the roots of this polynomial are prime(n), ..., prime(n+8).
FORMULA
MATHEMATICA
A127336 = {}; Do[AppendTo[A127336, Sum[Prime[x + n], {n, 0, 8}]], {x, 1, 50}]; A127336 (* Artur Jasinski, Jan 11 2007 *)
Table[Plus@@Prime[Range[n, n + 8]], {n, 50}] (* Alonso del Arte, Aug 27 2013 *)
Total/@Partition[Prime[Range[60]], 9, 1] (* Harvey P. Dale, Nov 18 2020 *)
PROG
(PARI) {m=46; k=9; for(n=1, m, print1(a=sum(j=0, k-1, prime(n+j)), ", "))} \\ Klaus Brockhaus, Jan 13 2007
{m=46; k=9; for(n=1, m, print1(abs(polcoeff(prod(j=0, k-1, (x-prime(n+j))), k-1)), ", "))} \\ Klaus Brockhaus, Jan 13 2007
(Magma) [&+[ NthPrime(n+k): k in [0..8] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
(Python)
from sympy import prime
def a(x): return sum([prime(x + n) for n in range(9)])
print([a(i) for i in range(1, 50)]) # Indranil Ghosh, Mar 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Jan 11 2007
EXTENSIONS
Edited by Klaus Brockhaus, Jan 13 2007
STATUS
approved