OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Michel Lagneau, Proof of convergence
FORMULA
Partial sums of A022844.
a(n)/n^2 ~ Pi/2.
a(n) = Pi/2 * n^2 + e(n) * n, where Pi/2-1 < e(n) < Pi/2. [Charles R Greathouse IV, May 27 2011]
MAPLE
with(numtheory):Digits:=100:s:=0:for n from 1 to 100 do: s:=s+floor(n*Pi):printf(`%d, `, s):od:
MATHEMATICA
Table[Sum[Floor[k*Pi], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Sep 24 2017 *)
Accumulate[Floor[Pi Range[60]]] (* Much more efficient than the above program. *) (* Harvey P. Dale, Aug 27 2023 *)
PROG
(PARI) for(n=1, 50, print1(sum(k=1, n, floor(k*Pi)), ", ")) \\ G. C. Greubel, Sep 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 27 2011
STATUS
approved