login
A123517
Triangle read by rows: T(n,k) = floor(n/k + 1/2) - floor(n/(k + 1/2)) (1<=k<=n).
1
1, 1, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 1, 0, 1, 2, 1, 1, 1, 0, 1, 3, 2, 0, 1, 0, 0, 1, 3, 1, 1, 1, 1, 0, 0, 1, 3, 2, 1, 0, 1, 1, 0, 0, 1, 4, 1, 1, 1, 1, 1, 0, 0, 0, 1, 4, 2, 1, 1, 0, 1, 1, 0, 0, 0, 1, 4, 2, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 5, 2, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 5, 2, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1
OFFSET
1,7
COMMENTS
Row n has sum n.
REFERENCES
B. Chen, C. Kimberling and P. R. Pudaite, Math. Magazine, 77, No. 1, 2004, pp. 70 (Q937), 75 (A937).
MAPLE
T:=proc(n, k) if k<=n then floor(n/k+1/2)-floor(n/(k+1/2)) else 0 fi end: for n from 1 to 16 do seq(T(n, k), k=1..n) od; # yields sequence in triangular form
MATHEMATICA
Table[Floor[n/k + 1/2] - Floor[n/(k + 1/2)], {n, 1, 10}, {k, 1, n}] // Flatten (* G. C. Greubel, Oct 14 2017 *)
PROG
(PARI) for(n=1, 10, for(k=1, n, print1(floor(n/k + 1/2) - floor(n/(k + 1/2)), ", "))) \\ G. C. Greubel, Oct 14 2017
CROSSREFS
Sequence in context: A324667 A258260 A094713 * A178948 A203827 A194289
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Oct 14 2006
STATUS
approved