login
a(n) = (1 - (-7)^n)/8.
13

%I #34 Sep 08 2022 08:44:39

%S 1,-6,43,-300,2101,-14706,102943,-720600,5044201,-35309406,247165843,

%T -1730160900,12111126301,-84777884106,593445188743,-4154116321200,

%U 29078814248401,-203551699738806,1424861898171643,-9974033287201500

%N a(n) = (1 - (-7)^n)/8.

%C q-integers for q = -7.

%H Vincenzo Librandi, <a href="/A014989/b014989.txt">Table of n, a(n) for n = 1..200</a>

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

%F a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).

%F a(n) = -6*a(n-1) + 7*a(n-2). - _Vincenzo Librandi_, Oct 22 2012

%F From _G. C. Greubel_, May 26 2018: (Start)

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

%F E.g.f.: (exp(x) - exp(-7*x))/8. (End)

%p a:=n->sum ((-7)^j, j=0..n): seq(a(n), n=0..25); # _Zerinvary Lajos_, Dec 16 2008

%t LinearRecurrence[{-6, 7}, {1, -6}, 30] (* _Vincenzo Librandi_, Oct 22 2012 *)

%o (Sage) [gaussian_binomial(n,1,-7) for n in range(1,21)] # _Zerinvary Lajos_, May 28 2009

%o (Magma) I:=[1,-6]; [n le 2 select I[n] else -6*Self(n-1)+7*Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Oct 22 2012

%o (PARI) x='x+O('x^30); Vec(x/((1-x)*(1+7*x))) \\ _G. C. Greubel_, May 26 2018

%Y Cf. A077925, A014983, A014985-A014987, A014990-A014994.

%K sign,easy

%O 1,2

%A _Olivier GĂ©rard_

%E Better name from _Ralf Stephan_, Jul 14 2013