%I #16 Feb 16 2018 12:36:26
%S 2,8,20,57,97,186,286,447,623,914,1190,1633,2021,2642,3196,3997,4745,
%T 5830,6792,8149,9345,11040,12502,14559,16323,18766,20894,23837,26313,
%U 29712,32608,36539,39885,44364,48118,53227,57557,63322,68136,74585,80017,87168
%N Sum of column entries of the table with rows of prime numbers (2,3,0,0,...), (0,5,7,11,0,...), (0,0,13,17,19,23,0,...), (0,0,0,29,31,37,41,43,0,...), ...
%H Harvey P. Dale, <a href="/A238760/b238760.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = sum(k=floor(n/2)...n+1, A000040(n+(k+1)*(k+2)/2-k) ). - _Ralf Stephan_, Mar 09 2014
%e 2 3
%e 0 5 7 11
%e 0 0 13 17 19 23
%e 0 0 0 29 31 37 41 43
%e 0 0 0 0 47 53 59 61 67 71
%e 0 0 0 0 0 73 79 83 89 97 101 103
%e ........................................................
%e sum of the first column = 2.
%e sum of the second column = 3 + 5 = 8.
%e sum of the third column = 7 + 13 = 20.
%e sum of the fourth column = 11 + 17 + 29 = 57.
%e sum of the fifth column = 19 + 31 + 47 = 97.
%e .............................................
%p with(numtheory):nn:=50:mm:=500:T:=array(1..nn,1..mm):for i from 1 to nn do:for j from 1 to mm do:T[i,j]:=0:od:od:m:=0:for n from 1 to nn do: for k from n to 2*n do: m:=m+1:T[n,k]:=ithprime(m):od:od:for p from 1 to nn do : s:=sum('T[q,p]', 'q'=1..nn): printf(`%d, `,s):od:
%t With[{nn=50},PadRight[#,nn]&/@(Join[Table[0,Length[#]-2],#]&/@ TakeList[ Prime[Range[((nn-1)(2+nn))/2]],Range[2,nn]])]//Total (* Requires Mathematica version 11 or later *) (* _Harvey P. Dale_, Feb 16 2018 *)
%o (Sage)
%o def a(n):
%o return sum([nth_prime((k+1)*(k+2)/2+n-k) for k in range(floor(n/2),n+1)])
%o # _Ralf Stephan_, Mar 09 2014
%Y Cf. A000040, A064694.
%K nonn
%O 1,1
%A _Michel Lagneau_, Mar 05 2014