login
a(n) = 2*A000129(n) + A000129(n-1) - n.
1

%I #9 Sep 02 2019 08:18:08

%S 1,3,9,25,65,163,401,977,2369,5731,13849,33449,80769,195011,470817,

%T 1136673,2744193,6625091,15994409,38613945,93222337,225058659,

%U 543339697,1311738097,3166815937,7645370019,18457556025,44560482121,107578520321,259717522819

%N a(n) = 2*A000129(n) + A000129(n-1) - n.

%C a(n)/a(n-1) tends to 1 + sqrt(2).

%H Colin Barker, <a href="/A129589/b129589.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n) = 2*A000129(n) + A000129(n-1) - n; where A000129 = the Pell sequence. a(n) = A000129(n+1) - n.

%F From _Colin Barker_, Sep 02 2019: (Start)

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

%F a(n) = (-(1 - sqrt(2))^(1+n) + (1+sqrt(2))^(1+n)) / (2*sqrt(2)) - n.

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

%F (End)

%e a(5) = 65 = 2*A000129(5) + A000129(4) - 5 = 2*29 + 12 - 5.

%e a(5) = 65 = A000129(6) - 5 = 70 - 5.

%o (PARI) Vec(x*(1 - x + x^2 + x^3) / ((1 - x)^2*(1 - 2*x - x^2)) + O(x^35)) \\ _Colin Barker_, Sep 02 2019

%Y Cf. A000129.

%K nonn,easy

%O 1,2

%A _Gary W. Adamson_, Sep 19 2007