cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A141385 a(n) = 7*a(n-1) - 9*a(n-2) + a(n-3) with a(0)=3, a(1)=7, a(2)=31.

This page as a plain text file.
%I A141385 #32 Feb 17 2022 00:01:13
%S A141385 3,7,31,157,827,4407,23563,126105,675075,3614143,19349431,103593805,
%T A141385 554625899,2969386479,15897666067,85113810057,455687062275,
%U A141385 2439682811479,13061709929935,69930511268509,374397872321627
%N A141385 a(n) = 7*a(n-1) - 9*a(n-2) + a(n-3) with a(0)=3, a(1)=7, a(2)=31.
%C A141385 The old definition given for this sequence was "A sequence obeying a third-order linear recurrence".
%C A141385 Ruling out finitely many exceptional terms, this sequence differs by a constant from several related enumerations with a slightly more complicated structure (fourth-order linear recurrence):
%C A141385 For n>0, A141221(n) = a(n) - 1. For n>2, A141384(n) = a(n) + 1.
%H A141385 Vincenzo Librandi, <a href="/A141385/b141385.txt">Table of n, a(n) for n = 0..1000</a>
%H A141385 G. P. Michon, <a href="http://www.numericana.com/answer/graphs.htm#prisms">Silent Prisms</a>: A Screaming Game for Short-Sighted People.
%H A141385 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-9,1).
%F A141385 G.f.: (3 - 14*x + 9*x^2)/(1 - 7*x + 9*x^2 - x^3).
%F A141385 a(n+3) = 7*a(n+2) - 9*a(n+1) + a(n).
%F A141385 a(n) = A^n + B^n + C^n, where, putting u = atan(sqrt(5319)/73), we have:
%F A141385 A = 5.3538557854308282... = (7 + 2*sqrt(22)*cos(u/3))/3,
%F A141385 B = 1.5235479602692093... = (7 - sqrt(22)*cos(u/3) + sqrt(66)*sin(u/3))/3,
%F A141385 C = 0.1225962542999624... = (7 - sqrt(22)*cos(u/3) - sqrt(66)*sin(u/3))/3.
%e A141385 a(0) = 3 = A^0 + B^0 + C^0, a(1) = 7 = A + B + C.
%p A141385 m:=30; S:=series( (3-14*x+9*x^2)/(1-7*x+9*x^2-x^3), x, m+1):
%p A141385 seq(coeff(S, x, j), j=0..m); # _G. C. Greubel_, Mar 30 2021
%t A141385 LinearRecurrence[{7,-9,1},{3,7,31},40] (* _Harvey P. Dale_, May 25 2011 *)
%t A141385 CoefficientList[Series[(3 -14x +9x^2)/(1 -7x +9x^2 -x^3), {x, 0, 50}], x] (* _Vincenzo Librandi_, Oct 21 2012 *)
%o A141385 (Magma) I:=[3,7,31]; [n le 3 select I[n] else 7*Self(n-1)-9*Self(n-2)+Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Oct 21 2012
%o A141385 (PARI) a(n)=([0,1,0; 0,0,1; 1,-9,7]^n*[3;7;31])[1,1] \\ _Charles R Greathouse IV_, Feb 10 2017
%o A141385 (Sage)
%o A141385 def A141385_list(prec):
%o A141385     P.<x> = PowerSeriesRing(ZZ, prec)
%o A141385     return P( (3-14*x+9*x^2)/(1-7*x+9*x^2-x^3) ).list()
%o A141385 A141385_list(40) # _G. C. Greubel_, Mar 30 2021
%Y A141385 Cf. A141221, A141384.
%K A141385 nonn,easy,nice
%O A141385 0,1
%A A141385 _Gerard P. Michon_, Jul 02 2008, Jul 23 2008
%E A141385 New definition by _Bruno Berselli_, Oct 22 2012