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.
%I A122876 #31 Jan 01 2024 11:50:35 %S A122876 1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1, %T A122876 -1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1, %U A122876 1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1,1,2,1,-1,-2,-1 %N A122876 a(0)=1, a(1)=1, a(2)=2, a(n) = a(n-1) - a(n-2) for n>2. %C A122876 Essentially the same as A057079, A087204 and A100051. %H A122876 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1). %F A122876 a(n) = Sum_{k=0..floor(n/2)} (-2)^k*A055830(n-k,k). %F A122876 G.f.: (1+2*x^2)/(1-x+x^2). %t A122876 LinearRecurrence[{1,-1}, {1,1,2}, 50] (* _G. C. Greubel_, May 03 2017; corrected by _Georg Fischer_, Apr 02 2019 *) %t A122876 (* or *) CoefficientList[Series[(1 + 2*x^2)/(1 - x + x^2), {x,0,50}], x] (* _G. C. Greubel_, May 03 2017 *) %o A122876 (PARI) my(x='x+O('x^50)); Vec((1+2*x^2)/(1-x+x^2)) \\ _G. C. Greubel_, May 03 2017 %Y A122876 Cf. A055830, A057079, A087204, A100051. %K A122876 sign,easy %O A122876 0,3 %A A122876 _Philippe Deléham_, Oct 24 2006