login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = Sum_{i=1..n} (prime(i+1)-prime(i))*prime(n+1-i).
2

%I #14 Apr 19 2021 17:10:56

%S 2,7,15,31,51,83,119,171,231,307,395,503,627,755,919,1079,1271,1483,

%T 1703,1967,2215,2495,2795,3127,3479,3839,4267,4647,5059,5539,5991,

%U 6511,7063,7651,8211,8855,9439,10139,10887,11611,12371,13159,13951,14715,15647,16591,17431,18487,19419,20415,21491

%N a(n) = Sum_{i=1..n} (prime(i+1)-prime(i))*prime(n+1-i).

%C Convolution of A000040 and A001223.

%H Robert Israel, <a href="/A343531/b343531.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 2*(7-5)+3*(5-3)+5*(3-2) = 15.

%p P:= [seq(ithprime(i),i=1..101)]:

%p G:= P[2..-1]-P[1..-2]:

%p seq(add(P[i]*G[n+1-i],i=1..n),n=1..100)];

%t Table[Sum[(Prime[i + 1] - Prime[i]) Prime[n + 1 - i], {i, n}], {n,

%t 50}] (* _Wesley Ivan Hurt_, Apr 18 2021 *)

%o (PARI) a(n) = sum(i=1, n, (prime(i+1)-prime(i))*prime(n+1-i)); \\ _Michel Marcus_, Apr 19 2021

%Y Cf. A000040, A001223.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Apr 18 2021