login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A176149
Triangle T(n, k) = n + 1 - mod(n, k+1) - mod(n, n-k+1), read by rows.
2
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, 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
OFFSET
0,5
COMMENTS
Row sums are: 1, 2, 5, 8, 15, 18, 31, 34, 49, 58, 75, ...
FORMULA
T(n, k) = n + 1 - mod(n, k+1) - mod(n, n-k+1).
EXAMPLE
Triangle begins as:
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, 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;
MATHEMATICA
Table[n+1 -Mod[n, k+1] -Mod[n, n-k+1], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(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
(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
CROSSREFS
Cf. A176151.
Sequence in context: A152714 A174546 A134444 * A091442 A025834 A257379
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Apr 10 2010
EXTENSIONS
Edited by G. C. Greubel, Feb 07 2021
STATUS
approved