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.

A131666 First differences of (A113405 prefixed with a 0).

This page as a plain text file.
%I A131666 #17 Sep 08 2022 08:45:31
%S A131666 0,0,1,1,2,3,7,14,29,57,114,227,455,910,1821,3641,7282,14563,29127,
%T A131666 58254,116509,233017,466034,932067,1864135,3728270,7456541,14913081,
%U A131666 29826162,59652323,119304647,238609294,477218589,954437177,1908874354
%N A131666 First differences of (A113405 prefixed with a 0).
%H A131666 G. C. Greubel, <a href="/A131666/b131666.txt">Table of n, a(n) for n = 0..1000</a>
%H A131666 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-1,2).
%F A131666 a(n+1) - 2*a(n) = 0, 1, -1, 0, -1, 1, ... is the hexaperiodic A092220 (corrected Sep 24 2007).
%F A131666 O.g.f.: x^2*(1-x)/((1+x)*(1-2*x)*(1-x+x^2)). - _R. J. Mathar_, Nov 23 2007
%F A131666 a(n) = Sum_{k=0..n-2} A001045(n-k+1)*binomial(k,n-k-2). - _Paul Barry_, Apr 22 2009
%F A131666 a(n) = (1/18)*( 2^(n+1) + 4*(-1)^n - 3*((-1)^floor((n+1)/3) + (-1)^floor((n+2)/3)) ). - _G. C. Greubel_, Nov 21 2019
%p A131666 seq(coeff(series(x^2*(1-x)/((1+x)*(1-2*x)*(1-x+x^2)), x, n+1), x, n), n = 0..35); # _G. C. Greubel_, Nov 21 2019
%t A131666 Table[(2*(-1)^n +2^n -3*((-1)^Floor[(n+1)/3] +(-1)^Floor[(n+2)/3])/2)/9, {n, 0, 35}] (* _G. C. Greubel_, Nov 21 2019 *)
%o A131666 (PARI) my(x='x+O('x^35)); concat([0,0], Vec(x^2*(1-x)/((1+x)*(1-2*x)*(1-x+x^2)))) \\ _G. C. Greubel_, Nov 21 2019
%o A131666 (Magma) R<x>:=PowerSeriesRing(Integers(), 35); [0,0] cat Coefficients(R!( x^2*(1-x)/((1+x)*(1-2*x)*(1-x+x^2)) )); // _G. C. Greubel_, Nov 21 2019
%o A131666 (Sage)
%o A131666 def A131666_list(prec):
%o A131666     P.<x> = PowerSeriesRing(ZZ, prec)
%o A131666     return P(x^2*(1-x)/((1+x)*(1-2*x)*(1-x+x^2))).list()
%o A131666 A131666_list(35) # _G. C. Greubel_, Nov 21 2019
%o A131666 (GAP) a:=[0,0,1,1];; for n in [5..35] do a[n]:=2*a[n-1]-a[n-3]+2*a[n-4]; od; a; # _G. C. Greubel_, Nov 21 2019
%K A131666 nonn,easy
%O A131666 0,5
%A A131666 _Paul Curtz_, Sep 14 2007