OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 2*5 + 3*3 = 19.
MATHEMATICA
Rest[Flatten[Table[ListConvolve[Prime[Range[2, n]], Prime[Range[n-1]]], {n, 50}]]] (* Harvey P. Dale, Jan 10 2022 *)
PROG
(Haskell)
a209403 n = sum $
zipWith (*) (reverse $ take n a000040_list) a065091_list
(Magma) [&+[NthPrime(k)*NthPrime(n+1-k): k in [1..n-1]]: n in [2..40]]; // Bruno Berselli, Mar 08 2012
(Python)
from numpy import convolve
from sympy import prime, primerange
def aupton(nn):
primes = list(primerange(2, prime(nn+1)+1))
return list(convolve(primes[:-1], primes[1:]))[:nn]
print(aupton(41)) # Michael S. Branicky, Jun 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 08 2012
STATUS
approved