login
a(n) = a(n-1) + Sum_{k=0..n/3} a(n-3k) with a(0)=1.
7

%I #25 Jul 08 2024 21:31:32

%S 1,1,1,2,3,4,7,11,16,26,41,62,98,154,237,371,581,901,1406,2197,3418,

%T 5329,8317,12956,20196,31501,49096,76532,119338,186029,289997,452141,

%U 704861,1098826,1713111,2670692,4163483,6490879,10119152,15775426

%N a(n) = a(n-1) + Sum_{k=0..n/3} a(n-3k) with a(0)=1.

%C If presented in three rows a(3n), a(3n+1) and a(3n+2) each term is the sum of the previous term in the sequence and the partial sum of its row.

%H G. C. Greubel, <a href="/A113435/b113435.txt">Table of n, a(n) for n = 0..1000</a>

%H Jia Huang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Huang/huang8.html">Partially Palindromic Compositions</a>, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 19.

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

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

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

%F G.f.: 1/(1-x) + x^3*Q(0)/(2-2*x) , where Q(k) = 1 + 1/(1 - x*(4*k+1 + 2*x^2 - x^3)/( x*(4*k+3 + 2*x^2 - x^3 ) + 1/Q(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Sep 11 2013

%t CoefficientList[Series[(1 - x^3)/(1 - x - 2*x^3 + x^4), {x,0,50}], x] (* _G. C. Greubel_, Mar 10 2017 *)

%t LinearRecurrence[{1,0,2,-1},{1,1,1,2},40] (* _Harvey P. Dale_, Dec 17 2023 *)

%o (PARI) x='x+O(x^50); Vec((1 - x^3)/(1 - x - 2*x^3 + x^4)) \\ _G. C. Greubel_, Mar 10 2017

%Y Cf. A113439, A113444, A028495.

%Y Partial sums of A176848.

%K nonn,easy

%O 0,4

%A _Floor van Lamoen_, Nov 04 2005