A195311 Row sums of A195310.
0, 1, 3, 5, 7, 10, 13, 17, 21, 25, 29, 33, 38, 43, 48, 54, 60, 66, 72, 78, 84, 90, 97, 104, 111, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 199, 208, 217, 226, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 356, 367, 378, 389, 400
Offset: 1
Keywords
Examples
If written as an irregular triangle in which row n has length A026741(n+1) then the first differences in row n are always n (see below). Triangle begins: 0, 1,3,5, 7,10, 13,17,21,25,29, 33,38,43, 48,54,60,66,72,78,84, 90,97,104,111, 118,126,134,142,150,158,166,174,182, 190,199,208,217,226, 235,245,255,265,275,285,295,305,315,325,335, 345,356,367,378,389,400
Programs
-
Mathematica
a1318[n_] := If[EvenQ[n], n (3 n/2 + 1)/4, (n + 1) (3 n + 1)/8]; a[n_] := DeleteCases[Table[n - a1318[k], {k, 1, n}], _?Negative] // Total; Array[a, 56] (* Jean-François Alcover, Jun 26 2019 *)
-
Sage
def A195311(n): return add(max(0,n-k*(3*k-1)/2)+max(0,n-k*(3*k+1)/2) for k in (1..n)) [A195311(n) for n in (1..56)] # Peter Luschny, Oct 12 2012