|
|
A084370
|
|
Convolution of odd primes with themselves.
|
|
1
|
|
|
9, 30, 67, 136, 237, 386, 587, 852, 1213, 1658, 2227, 2932, 3765, 4766, 5939, 7324, 8917, 10746, 12851, 15200, 17845, 20794, 24083, 27748, 31785, 36250, 41107, 46376, 52113, 58350, 65111, 72444, 80353, 88858, 98003, 107744, 118201, 129410, 141355, 154080
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(4) = 11*3 + 7*5 + 5*7 + 3*11 = 136.
|
|
MATHEMATICA
|
Table[With[{c=Prime[Range[2, n]]}, ListConvolve[c, c]], {n, 2, 40}]//Flatten (* Harvey P. Dale, Apr 25 2016 *)
|
|
PROG
|
(PARI) conv(n)=local(v, s); v=primes(n+1); s=0; for(i=2, length(v), s+=v[i]*v[length(v)-i+2]); s
for(n=1, 40, print1(conv(n)", "))
(Python)
from numpy import convolve
from sympy import prime, primerange
def aupton(terms):
p = list(primerange(3, prime(terms+1)+1))
return list(convolve(p, p))[:terms]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|