OFFSET
1,3
COMMENTS
See A227347.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1).
FORMULA
a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7).
G.f.: (x*(1 + x^2 + x^3))/((1 - x)^3*(1 + x + x^2 + x^3 + x^4)).
According to Wolfram Alpha, a(n) = floor(Re(E(n^2|Pi))) where E(x|m) is the incomplete elliptic integral of the second kind. - Kritsada Moomuang, Jan 28 2022
a(n) = a(n-1) + floor(3*n/5), n > 1. - Gennady Eremin, Mar 15 2022
a(n) = floor(n*(3*n-1)/10). - Kevin Ryde, Mar 15 2022
EXAMPLE
a(1) = floor(3/5) = 0; a(2) = floor(6/5) = 1; a(3) = a(2) + floor(9/5) = 2; a(4) = a(3) + floor(12/5) = 4.
MATHEMATICA
z = 150; r = 3/5; k = 1; a[n_] := Sum[Floor[r*x^k], {x, 1, n}]; t = Table[a[n], {n, 1, z}]
PROG
(PARI) a(n) = (3*n^2-n)\10; \\ Kevin Ryde, Mar 15 2022
(Python) a = lambda n: n*(3*n-1)//10 # Gennady Eremin, Mar 20 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 08 2013
STATUS
approved