%I #6 Sep 08 2022 08:45:45
%S 2,7,48,34,125,243,1106,852,819,2630,1606,5262,8099,4333,7110,18968,
%T 18819,25119,25042,18330,51723,105919,73002,104532,155125,94601,
%U 234792,102410,344607,258735,394072,668336,358809,661657,302120,813726,198283
%N Row sums of triangle defined in A095181.
%e Fifth row is 11, 18, 25, 32, 39, so a(5) = 125.
%t a[n_] := For[r = 1, True, r++, ro = Table[Prime[n] + k* r, {k, 0, n - 1}]; If[AllTrue[Rest[ro], CompositeQ[#] && ! Divisible[#, Prime[n]] &], Return[ro // Total]]]; Table[a[n], {n, 1, 37}] (* _Jean-François Alcover_, Sep 26 2017 *)
%o (Magma) ap:=function(j) p:=NthPrime(j); a:=1; while true do S:=[ x: x in [p+a..p+a*(j-1) by a] ]; if forall(t) {x: x in S | not IsPrime(x) and x mod p gt 0 } then return [p] cat S; else a+:=1; end if; end while; end function; [ &+ap(j): j in [1..37] ];
%Y Cf. A095181.
%K nonn
%O 1,1
%A _Klaus Brockhaus_, May 30 2009