login
Start with all terms set to 0. Then add n to the next n+3 terms for n=0,1,2,... .
2

%I #23 Feb 19 2022 11:50:47

%S 0,0,1,3,6,10,14,20,25,33,39,49,56,68,76,90,99,115,125,143,154,174,

%T 186,208,221,245,259,285,300,328,344,374,391,423,441,475,494,530,550,

%U 588,609,649,671,713,736,780,804,850,875,923,949,999,1026,1078,1106

%N Start with all terms set to 0. Then add n to the next n+3 terms for n=0,1,2,... .

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

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

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

%F a(n) = (6*n^2 + 6*n - 23 + (7 - 2*n)*(-1)^n)/16 for n > 1.

%F a(n) = floor((n+3)/4) * floor((3*n-4)/2) + (floor((n-1)/2) mod 2) * floor((3*n-3)/4) for n > 1.

%F For n > 1, a(2n) = A095794(n). - _Jon E. Schoenfield_, Feb 19 2022

%e n | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, ...

%e __________________________________________

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...

%e + 0, 0, 0

%e + 1, 1, 1, 1,

%e + 2, 2, 2, 2, 2

%e + 3, 3, 3, 3, 3, 3

%e + 4, 4, 4, 4, 4, 4, 4

%e + 5, 5, 5, 5, 5, 5, 5, 5

%e + 6, 6, 6, 6, 6, 6, 6, 6, 6

%e + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7

%e + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8

%e + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9

%e + ...

%e __________________________________________

%e a(n)|0, 0, 1, 3, 6,10,14,20,25,33,39, ...

%p A272058:=n->(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16: 0,0,seq(A272058(n),n=2..100);

%t CoefficientList[Series[x^2*(1 + 2 x + x^2 - x^4)/((1 - x)^3*(1 + x)^2), {x, 0, 50}], x] (* or *)

%t LinearRecurrence[{1, 2, -2, -1, 1, 0, 0}, {0, 0, 1, 3, 6, 10, 14}, 60]

%o (Magma) [0,0] cat [(6*n^2+6*n-23+(7-2*n)*(-1)^n)/16 : n in [2..100]];

%Y Cf. A095794, A258087.

%K nonn,easy

%O 0,4

%A _Wesley Ivan Hurt_, Apr 19 2016