login
A343531
a(n) = Sum_{i=1..n} (prime(i+1)-prime(i))*prime(n+1-i).
2
2, 7, 15, 31, 51, 83, 119, 171, 231, 307, 395, 503, 627, 755, 919, 1079, 1271, 1483, 1703, 1967, 2215, 2495, 2795, 3127, 3479, 3839, 4267, 4647, 5059, 5539, 5991, 6511, 7063, 7651, 8211, 8855, 9439, 10139, 10887, 11611, 12371, 13159, 13951, 14715, 15647, 16591, 17431, 18487, 19419, 20415, 21491
OFFSET
1,1
COMMENTS
Convolution of A000040 and A001223.
LINKS
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
Sequence in context: A290628 A192962 A294539 * A095091 A131412 A345448
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 18 2021
STATUS
approved