login
a(n) = (3*b(n) + b(n-1) + 1)/2, where b = A005409.
1

%I #30 Sep 08 2022 08:46:24

%S 2,7,19,48,118,287,695,1680,4058,9799,23659,57120,137902,332927,

%T 803759,1940448,4684658,11309767,27304195,65918160,159140518,

%U 384199199,927538919,2239277040,5406093002,13051463047,31509019099,76069501248,183648021598,443365544447

%N a(n) = (3*b(n) + b(n-1) + 1)/2, where b = A005409.

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

%H Bill Allombert, Nicolas Brisebarre, and Alain Lasjaunias, <a href="https://arxiv.org/abs/1607.07235">On a two-valued sequence and related continued fractions in power series fields</a>, arXiv:1607.07235 [math.NT], 2016-2017; The Ramanujan Journal 45.3 (2018): 859-871. See Theorem 3.

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

%F From _Colin Barker_, Nov 10 2019: (Start)

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

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

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

%F (End)

%F E.g.f.: (1/2)*exp(x)*(-3 + 3*cosh(sqrt(2)*x) + 2*sqrt(2)*sinh(sqrt(2)*x)). - _Stefano Spezia_, Nov 11 2019

%F 2*a(n) = A001333(n+2) - 3. - _R. J. Mathar_, Jun 17 2020

%F a(n) = (A002203(n+2) - 6)/4. - _G. C. Greubel_, Apr 23 2021

%p m:=35; S:=series( x*(2+x)/((1-x)*(1-2*x-x^2)), x, m+1):

%p seq(coeff(S, x, j), j=1..m); # _G. C. Greubel_, Apr 23 2021

%t LinearRecurrence[{3,-1,-1},{2,7,19},40] (* or *) CoefficientList[Series[(2-x-3x^2-x^3)/(1-x-x^2)/(1-3*x+x^2+x^3),{x,0,33}],x] (* _Vincenzo Librandi_, Nov 11 2019 *)

%t (LucasL[Range[35] +2, 2] -6)/4 (* _G. C. Greubel_, Apr 23 2021 *)

%o (PARI) Vec(x*(2+x)/((1-x)*(1 -2*x -x^2)) + O(x^40)) \\ _Colin Barker_, Nov 10 2019

%o (Magma) I:=[2,7,19]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-Self(n-3): n in [1..40]] // _Vincenzo Librandi_, Nov 11 2019

%o (Sage) [(lucas_number2(n+2,2,-1) -6)/4 for n in (1..35)] # _G. C. Greubel_, Apr 23 2021

%Y Cf. A001333, A002203, A005409.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, Nov 09 2019