login
A024526
a(n) = Sum_{0 <= i < j <= n} (prime(j) - prime(i))^2, where prime(0) = 1.
0
1, 6, 35, 116, 413, 882, 1855, 3168, 5369, 9478, 14387, 22260, 32605, 44346, 59231, 79768, 107145, 137078, 175579, 220568, 269045, 329030, 397583, 480404, 585001, 701702, 824771, 961240, 1104749, 1263050, 1480879, 1717964, 1985889, 2264626, 2601603
OFFSET
1,2
PROG
(PARI) p(n) = if (n==0, 1, prime(n));
a(n) = sum(i=0, n-1, sum(j=i+1, n, (p(j)-p(i))^2));
\\ Michel Marcus, Mar 23 2013
CROSSREFS
Sequence in context: A033578 A101077 A094952 * A213504 A089581 A132657
KEYWORD
nonn
EXTENSIONS
a(9) corrected by Sean A. Irvine, Jul 13 2019
Name edited by Michel Marcus, Jul 17 2019
STATUS
approved