login
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 2*a(n-4) + a(n-5) for n >= 10, a(0) = 2, a(1) = 4, a(2) = 7, a(3) = 12, a(4) = 20, a(5) = 32, a(6) = 50, a(7) = 77, a(8) = 116, a(9) = 174.
2

%I #22 Sep 08 2022 08:46:19

%S 2,4,7,12,20,32,50,77,116,174,260,386,571,843,1242,1827,2685,3943,

%T 5787,8490,12452,18259,26770,39244,57526,84320,123589,181141,265488,

%U 389105,570275,835793,1224929,1795236,2631062,3856025,5651296,8282394,12138456,17789790

%N a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 2*a(n-4) + a(n-5) for n >= 10, a(0) = 2, a(1) = 4, a(2) = 7, a(3) = 12, a(4) = 20, a(5) = 32, a(6) = 50, a(7) = 77, a(8) = 116, a(9) = 174.

%C Conjecture: a(n) is the number of letters (0's and 1's) in the n-th iterate of the mapping 00->0010, 01->011, 10->001, starting with 00; see A289112.

%H Clark Kimberling, <a href="/A289115/b289115.txt">Table of n, a(n) for n = 0..10000</a>

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

%F a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 2*a(n-4) + a(n-5) for n >= 10, a(0) = 2, a(1) = 4, a(2) = 7, a(3) = 12, a(4) = 20, a(5) = 32, a(6) = 50, a(7) = 77, a(8) = 116, a(9) = 174.

%F G.f.: (2 - 2*x + x^2 - x^3 + x^4 - x^8 + x^9) / ((1 - x)^2*(1 - x - x^3)). - _Colin Barker_, Jul 02 2017

%t Join[{2, 4, 7, 12, 20}, LinearRecurrence[{3, -3, 2, -2, 1}, {32, 50, 77, 116, 174}, 40]]

%t CoefficientList[Series[(2 - 2 x + x^2 - x^3 + x^4 - x^8 + x^9) / ((1 - x)^2 (1 - x - x^3)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Sep 26 2017 *)

%o (PARI) Vec((2 - 2*x + x^2 - x^3 + x^4 - x^8 + x^9) / ((1 - x)^2*(1 - x - x^3)) + O(x^60)) \\ _Colin Barker_, Jul 02 2017

%o (Magma) I:=[2,4,7,12,20,32,50,77,116,174]; [n le 10 select I[n] else 3*Self(n-1)-3*Self(n-2)+2*Self(n-3)-2*Self(n-4)+ Self(n-5): n in [1..40]]; // _Vincenzo Librandi_, Sep 26 2017

%Y Cf. A289112.

%K nonn,easy

%O 0,1

%A _Clark Kimberling_, Jun 28 2017