|
|
A160915
|
|
Row sums of triangle defined in A095181.
|
|
1
|
|
|
2, 7, 48, 34, 125, 243, 1106, 852, 819, 2630, 1606, 5262, 8099, 4333, 7110, 18968, 18819, 25119, 25042, 18330, 51723, 105919, 73002, 104532, 155125, 94601, 234792, 102410, 344607, 258735, 394072, 668336, 358809, 661657, 302120, 813726, 198283
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
Fifth row is 11, 18, 25, 32, 39, so a(5) = 125.
|
|
MATHEMATICA
|
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 *)
|
|
PROG
|
(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] ];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|