login
a(1)=1, for n>1, a(n) = n^2/4 + n/2 for even n, a(n) = n^2/4 + n - 5/4 for odd n.
0

%I #19 Jun 10 2020 04:50:30

%S 1,2,4,6,10,12,18,20,28,30,40,42,54,56,70,72,88,90,108,110,130,132,

%T 154,156,180,182,208,210,238,240,270,272,304,306,340,342,378,380,418,

%U 420,460,462,504,506,550,552,598,600,648,650,700,702,754,756,810,812,868

%N a(1)=1, for n>1, a(n) = n^2/4 + n/2 for even n, a(n) = n^2/4 + n - 5/4 for odd n.

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

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

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

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

%F From _Bernard Schott_, Jun 10 2020: (Start)

%F Bisections are:

%F a(1) = 1 and a(2k+1) = A028552(k) for k >= 1,

%F a(2k) = A002378(k) for k >= 1, hence,

%F a(2k+2) = a(2k+1) + 2 for k >= 1. (End)

%t a[n_] := If[n == 1, 1, If[Mod[n, 2] == 0, n^2/4 + n/2, n^2/4 + n - 5/4]];

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

%K nonn,easy

%O 1,2

%A _Roger L. Bagula_, Dec 15 2008