|
|
A357251
|
|
a(n) = Sum_{1<=i<=j<=n} prime(i)*prime(j).
|
|
3
|
|
|
4, 19, 69, 188, 496, 1029, 2015, 3478, 5778, 9519, 14479, 21768, 31526, 43609, 59025, 79218, 105178, 135739, 173795, 219164, 271140, 333629, 406171, 491878, 594698, 711959, 842151, 988848, 1150168, 1330177, 1548617, 1791098, 2063454, 2359107, 2698231, 3064708, 3470396, 3918157, 4404795, 4938846
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is the sum of products of unordered pairs of (not necessarily distinct) elements from the first n primes.
It appears that 4 is the only square in the sequence.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3) = 2*2 + 2*3 + 2*5 + 3*3 + 3*5 + 5*5 = 69.
|
|
MAPLE
|
P:= [seq(ithprime(i), i=1..100)]:
S:= ListTools:-PartialSums(P):
ListTools:-PartialSums(zip(`*`, P, S));
|
|
MATHEMATICA
|
Accumulate[(p = Prime[Range[40]]) * Accumulate[p]] (* Amiram Eldar, Sep 20 2022 *)
|
|
PROG
|
(Python)
from itertools import accumulate
from sympy import prime, primerange
def aupton(nn):
p = list(primerange(2, prime(nn)+1))
return list(accumulate(c*d for c, d in zip(p, accumulate(p))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|