Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Partial sums of A194161.
3

%I #10 Nov 08 2017 11:53:29

%S 0,1,2,4,6,8,11,14,18,22,27,33,39,46,53,61,69,77,86,95,105,115,126,

%T 138,150,163,176,190,204,218,233,248,264,280,296,313,331,349,368,387,

%U 407,428,449,471,493,515,538,562,586,611,636,661,687,714,741,769

%N Partial sums of A194161.

%H G. C. Greubel, <a href="/A194162/b194162.txt">Table of n, a(n) for n = 1..1000</a>

%t r = Sqrt[2];

%t a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]

%t Table[a[n], {n, 1, 90}]

%t s[n_] := Sum[a[k], {k, 1, n}] (* A194161 *)

%t Table[s[n], {n, 1, 100}]

%t b[n_] := Floor[n (n + 1) r/2] - Sum[Floor[k*r], {k, 1, n}]

%t Table[b[n], {n, 1, 90}] (* A194162 *)

%o (PARI) b(n) = floor(sum(k=1, n, frac(k*sqrt(2))));

%o a(n) = sum(k=1, n, b(k)); \\ _Michel Marcus_, Nov 06 2017

%Y Cf. A194161.

%K nonn

%O 1,3

%A _Clark Kimberling_, Aug 18 2011