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.

A215458 a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 4*a(n-4) starting 0, 1, 4, 7.

This page as a plain text file.
%I A215458 #47 Sep 08 2022 08:46:03
%S A215458 0,1,4,7,8,11,28,71,144,259,484,991,2072,4187,8236,16247,32544,65587,
%T A215458 131572,262543,523688,1047179,2096956,4196903,8391600,16775011,
%U A215458 33546244,67105087,134230328,268455611,536865868,1073696471,2147448384,4295022739
%N A215458 a(n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 4*a(n-4) starting 0, 1, 4, 7.
%H A215458 Vincenzo Librandi, <a href="/A215458/b215458.txt">Table of n, a(n) for n = 0..1000</a>
%H A215458 H. C. Williams and R. K. Guy, <a href="http://dx.doi.org/10.1142/S1793042111004587">Some fourth-order linear divisibility sequences</a>, Intl. J. Number Theory 7 (5) (2011) 1255-1277; P1=4, P2=3, Q=2.
%H A215458 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-7,8,-4).
%F A215458 G.f.: -x*(-1+2*x^2) / ( (x-1)*(2*x-1)*(2*x^2-x+1) ).
%F A215458 a(n) = A002248(n)/2.
%F A215458 a(n) = (2^n - (1/2 - (i * sqrt(7))/2)^n - (1/2 + (i * sqrt(7))/2)^n + 1)/2 where i = sqrt(-1). - _Paul S. Vanderveen_, Jul 08 2017
%F A215458 a(n) = 2^(n-1) - 2^(n/2) * cos(n * arctan(sqrt(7))) + 1/2. - _Peter Luschny_, Jul 26 2017
%t A215458 CoefficientList[Series[-x (-1 + 2 x^2)/((x - 1) (2*x-1) (2 x^2 - x + 1)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Dec 23 2012 *)
%t A215458 LinearRecurrence[{4,-7,8,-4},{0,1,4,7},40] (* _Harvey P. Dale_, Mar 22 2019 *)
%o A215458 (Magma) I:=[0,1,4,7]; [n le 4 select I[n] else 4*Self(n-1)-7*Self(n-2)+8*Self(n-3)-4*Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Dec 23 2012
%o A215458 (PARI) a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -4,8,-7,4]^n*[0;1;4;7])[1,1] \\ _Charles R Greathouse IV_, Jul 07 2017
%o A215458 (Sage)
%o A215458 a = lambda n: (2^n - lucas_number2(n, 1, 2) + 1) // 2
%o A215458 print([a(n) for n in range(34)]) # _Peter Luschny_, Jul 26 2017
%K A215458 nonn,easy
%O A215458 0,3
%A A215458 _R. J. Mathar_, Aug 11 2012