OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 2*(7-5)+3*(5-3)+5*(3-2) = 15.
MAPLE
P:= [seq(ithprime(i), i=1..101)]:
G:= P[2..-1]-P[1..-2]:
seq(add(P[i]*G[n+1-i], i=1..n), n=1..100)];
MATHEMATICA
Table[Sum[(Prime[i + 1] - Prime[i]) Prime[n + 1 - i], {i, n}], {n,
50}] (* Wesley Ivan Hurt, Apr 18 2021 *)
PROG
(PARI) a(n) = sum(i=1, n, (prime(i+1)-prime(i))*prime(n+1-i)); \\ Michel Marcus, Apr 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 18 2021
STATUS
approved