login
a(n) = n^2 - floor(n/3)^2.
1

%I #15 Feb 20 2024 03:27:24

%S 0,1,4,8,15,24,32,45,60,72,91,112,128,153,180,200,231,264,288,325,364,

%T 392,435,480,512,561,612,648,703,760,800,861,924,968,1035,1104,1152,

%U 1225,1300,1352,1431,1512,1568,1653,1740,1800,1891,1984,2048

%N a(n) = n^2 - floor(n/3)^2.

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,2,-2,0,-1,1).

%F a(n) = a(n-1)+2*a(n-3)-2*a(n-4)-a(n-6)+a(n-7).

%F G.f.: (x + 3 x^2 + 4 x^3 + 5 x^4 + 3 x^5)/(((1 - x)^3)*(1 + x + x^2)^2)

%t a[n_] := n^2 - Floor[n/3]^2

%t Table[a[n], {n, 0, 90}] (* A213035 *)

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, Jun 06 2012