login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A160915 Row sums of triangle defined in A095181. 1

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 09:52 EDT 2024. Contains 374274 sequences. (Running on oeis4.)