[go: up one dir, main page]

login
Triangle T(n, k) = n + 1 - mod(n, k+1) - mod(n, n-k+1), read by rows.
2

%I #14 Feb 08 2021 05:19:45

%S 1,1,1,1,3,1,1,3,3,1,1,5,3,5,1,1,5,3,3,5,1,1,7,6,3,6,7,1,1,7,6,3,3,6,

%T 7,1,1,9,6,7,3,7,6,9,1,1,9,9,7,3,3,7,9,9,1,1,11,9,7,8,3,8,7,9,11,1

%N Triangle T(n, k) = n + 1 - mod(n, k+1) - mod(n, n-k+1), read by rows.

%C Row sums are: 1, 2, 5, 8, 15, 18, 31, 34, 49, 58, 75, ...

%H G. C. Greubel, <a href="/A176149/b176149.txt">Rows n = 0..100 of the triangle, flattened</a>

%F T(n, k) = n + 1 - mod(n, k+1) - mod(n, n-k+1).

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 3, 1;

%e 1, 3, 3, 1;

%e 1, 5, 3, 5, 1;

%e 1, 5, 3, 3, 5, 1;

%e 1, 7, 6, 3, 6, 7, 1;

%e 1, 7, 6, 3, 3, 6, 7, 1;

%e 1, 9, 6, 7, 3, 7, 6, 9, 1;

%e 1, 9, 9, 7, 3, 3, 7, 9, 9, 1;

%e 1, 11, 9, 7, 8, 3, 8, 7, 9, 11, 1;

%t Table[n+1 -Mod[n, k+1] -Mod[n, n-k+1], {n,0,10}, {k,0,n}]//Flatten

%o (Sage) flatten([[n+1 - n%(k+1) - n%(n-k+1) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Feb 07 2021

%o (Magma) [n+1 - n mod (k+1) - n mod (n-k+1): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Feb 07 2021

%Y Cf. A176151.

%K nonn,tabl,easy

%O 0,5

%A _Roger L. Bagula_, Apr 10 2010

%E Edited by _G. C. Greubel_, Feb 07 2021