login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = Sum_{0 <= i < j <= n} (prime(j) - prime(i))^2, where prime(0) = 1.
0

%I #15 Jul 17 2019 02:55:58

%S 1,6,35,116,413,882,1855,3168,5369,9478,14387,22260,32605,44346,59231,

%T 79768,107145,137078,175579,220568,269045,329030,397583,480404,585001,

%U 701702,824771,961240,1104749,1263050,1480879,1717964,1985889,2264626,2601603

%N a(n) = Sum_{0 <= i < j <= n} (prime(j) - prime(i))^2, where prime(0) = 1.

%o (PARI) p(n) = if (n==0, 1, prime(n));

%o a(n) = sum(i=0, n-1, sum(j=i+1, n, (p(j)-p(i))^2));

%o \\ _Michel Marcus_, Mar 23 2013

%K nonn

%O 1,2

%A _Clark Kimberling_

%E a(9) corrected by _Sean A. Irvine_, Jul 13 2019

%E Name edited by _Michel Marcus_, Jul 17 2019