login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 4*a(n-1) - a(n-2) + 3, with a(0) = -1, a(1) = 1.
5

%I #24 Sep 08 2022 08:45:10

%S -1,1,8,34,131,493,1844,6886,25703,95929,358016,1336138,4986539,

%T 18610021,69453548,259204174,967363151,3610248433,13473630584,

%U 50284273906,187663465043,700369586269,2613814880036,9754889933878,36405744855479,135868089488041

%N a(n) = 4*a(n-1) - a(n-2) + 3, with a(0) = -1, a(1) = 1.

%C Apart from the initial -1, these are the numbers k such that the triangular number k*(k + 1)/2 is the sum of three consecutive triangular numbers - see A129803. - _Brian Nowell_, Nov 03 2009

%H Vincenzo Librandi, <a href="/A082840/b082840.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 (5,-5,1).

%F a(n) = A001571(n) - 1. - _N. J. A. Sloane_, Nov 03 2009

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

%F a(n) = -3/2 + (1/12)*( (a -2*b +5)*a^n + (b -2*a +5)*b^n ), with a = 2 + sqrt(3), b = 2 - sqrt(3):.

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

%F a(n) = (1/2)*(A001834(n) - 3).

%F E.g.f.: ((1 + sqrt(3))*exp((2 + sqrt(3))*x) + (1 - sqrt(3))*exp((2 - sqrt(3))*x) - 6*exp(x))/4. - _Franck Maminirina Ramaharo_, Nov 12 2018

%t CoefficientList[Series[(-1+6x-2x^2)/((1-x)(1-4x+x^2)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Apr 15 2014 *)

%t LinearRecurrence[{5,-5,1}, {-1,1,8}, 30] (* _G. C. Greubel_, Feb 25 2019 *)

%o (PARI) is(n)=ispolygonal(3/2*n*(n+1)+4,3) || n==-1 \\ _Charles R Greathouse IV_, Apr 14 2014

%o (PARI) my(x='x+O('x^30)); Vec(-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))) \\ _G. C. Greubel_, Feb 25 2019

%o (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( -(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2)) )); // _G. C. Greubel_, Feb 25 2019

%o (Sage) (-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Feb 25 2019

%o (GAP) a:=[-1,1,8];; for n in [4..30] do a[n]:=5*a[n-1]-5*a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Feb 25 2019

%Y Cf. A001571, A071954.

%K easy,sign

%O 0,3

%A Mario Catalani (mario.catalani(AT)unito.it), Apr 14 2003