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.

A091140 a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) with initial terms 1, 3, 9.

This page as a plain text file.
%I A091140 #18 May 18 2021 19:54:00
%S A091140 1,3,9,28,86,266,820,2532,7812,24112,74408,229640,708688,2187120,
%T A091140 6749712,20830528,64285664,198394016,612269632,1889544000,5831378496,
%U A091140 17996393728,55539213440,171401244800,528966555904,1632459664128,5037983062272,15547871669248
%N A091140 a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) with initial terms 1, 3, 9.
%C A091140 One of 3 related sequences generated from finite difference operations. Let r(1)=s(1)=t(1)=1. Given r(n), s(n) and t(n), let f(x) = r(n) x^2 + s(n) x + t(n) and let r(n+1), s(n+1) and t(n+1) be the 0th, 1st and 2nd differences of f(x) at x=1. I.e., r(n+1) = f(1) = r(n)+s(n)+t(n), s(n+1) = f(2)-f(1) = 3r(n)+s(n) and t(n+1) = f(3)-2f(2)+f(1) = 2r(n). This sequence gives r(n).
%H A091140 Colin Barker, <a href="/A091140/b091140.txt">Table of n, a(n) for n = 1..1000</a>
%H A091140 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,4,-2).
%F A091140 Let v(n) be the column vector with elements r(n), s(n), t(n); then v(n) = [1 1 1 / 3 1 0 / 2 0 0] v(n-1).
%F A091140 The limit as n->infinity of a(n+1)/a(n) is the largest root of x^3 - 2x^2 - 4x + 2 = 0, which is about 3.086130197651494.
%F A091140 G.f.: -x*(x^2-x-1) / (2*x^3-4*x^2-2*x+1). - _Colin Barker_, May 21 2015
%t A091140 a[n_] := (MatrixPower[{{1, 1, 1}, {3, 1, 0}, {2, 0, 0}}, n-1].{{1}, {1}, {1}})[[1, 1]]
%t A091140 LinearRecurrence[{2,4,-2},{1,3,9},30] (* _Harvey P. Dale_, May 18 2021 *)
%o A091140 (PARI) Vec(-x*(x^2-x-1)/(2*x^3-4*x^2-2*x+1) + O(x^100)) \\ _Colin Barker_, May 21 2015
%Y A091140 Cf. s(n) = A091141(n), t(n) = A091142(n).
%K A091140 nonn,easy
%O A091140 1,2
%A A091140 _Gary W. Adamson_, Dec 21 2003