login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316528 a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10. 3

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

%S 1,4,10,24,54,118,252,530,1102,2272,4654,9486,19260,38986,78726,

%T 158672,319318,641830,1288828,2586018,5185566,10393024,20821470,

%U 41700254,83493244,167136538,334515862,669424560,1339484742,2679997942,5361659964,10726012466,21456381550

%N a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10.

%C Row sums of triangle A316939.

%H Colin Barker, <a href="/A316528/b316528.txt">Table of n, a(n) for n = 0..1000</a>

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

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

%F a(n) = 2*A116712(n) for n > 0, a(0)=1.

%F a(n) = 5*2^n - 2*Fibonacci(n+3). - _Bruno Berselli_, Jul 16 2018

%F a(n) = (5*2^n - (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - _Colin Barker_, Jul 23 2018

%p seq(coeff(series((1+x-x^2)/(1-3*x+x^2+2*x^3), x,n+1),x,n),n=0..35); # _Muniru A Asiru_, Jul 14 2018

%t RecurrenceTable[{a[n] == 3 a[n - 1] - a[n - 2] - 2 a[n - 3], a[0] == 1, a[1] == 4, a[2] == 10}, a, {n, 0, 40}]

%t Table[5 2^n - 2 Fibonacci[n + 3], {n, 0, 40}] (* _Bruno Berselli_, Jul 16 2018 *)

%t LinearRecurrence[{3,-1,-2},{1,4,10},40] (* _Harvey P. Dale_, Jul 18 2020 *)

%o (Magma) I:=[1,4,10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];

%o (GAP) a:=[1,4,10];; for n in [4..35] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3]; od; a; # _Muniru A Asiru_, Jul 14 2018

%o (PARI) Vec((1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ _Colin Barker_, Jul 23 2018

%Y Cf. A000045, A020714, A116712, A118658, A316939.

%K nonn,easy

%O 0,2

%A _Vincenzo Librandi_, Jul 14 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)