login
a(n) = [Sum_{k=1..n} (k/8)], where [ ]=floor, ( )=fractional part.
3

%I #20 Jun 11 2020 03:04:45

%S 0,0,0,1,1,2,3,3,3,3,4,4,5,6,7,7,7,7,7,8,8,9,10,10,10,10,11,11,12,13,

%T 14,14,14,14,14,15,15,16,17,17,17,17,18,18,19,20,21,21,21,21,21,22,22,

%U 23,24,24,24,24,25,25,26,27,28,28,28,28,28,29,29,30,31,31,31,31

%N a(n) = [Sum_{k=1..n} (k/8)], where [ ]=floor, ( )=fractional part.

%H G. C. Greubel, <a href="/A194235/b194235.txt">Table of n, a(n) for n = 1..5000</a>

%F From _Chai Wah Wu_, Jun 10 2020: (Start)

%F a(n) = a(n-1) + a(n-16) - a(n-17) for n > 17.

%F G.f.: x*(x^14 + x^13 + x^12 + x^10 + x^6 + x^5 + x^3)/(x^17 - x^16 - x + 1). (End)

%t r = 1/8;

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

%t Table[a[n], {n, 1, 90}] (* A194235 *)

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

%t Table[s[n], {n, 1, 100}] (* A194236 *)

%o (PARI) a(n) = floor(sum(k=1, n, frac(k/8))); \\ _Michel Marcus_, Nov 03 2017

%Y Cf. A194236.

%K nonn

%O 1,6

%A _Clark Kimberling_, Aug 20 2011