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 A280166 #32 Sep 08 2022 08:46:18 %S A280166 1,-1,4,-3,8,-5,12,-7,16,-9,20,-11,24,-13,28,-15,32,-17,36,-19,40,-21, %T A280166 44,-23,48,-25,52,-27,56,-29,60,-31,64,-33,68,-35,72,-37,76,-39,80, %U A280166 -41,84,-43,88,-45,92,-47,96,-49,100,-51,104,-53,108,-55,112,-57,116 %N A280166 a(2*n) = 4*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1. %H A280166 G. C. Greubel, <a href="/A280166/b280166.txt">Table of n, a(n) for n = 0..5000</a> %H A280166 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A280166 Euler transform of length 6 sequence [-1, 4, 1, -1, 0, -1]. %F A280166 a(n) = (-1)^n * A257088(n), with A257088 multiplicative (see there). %F A280166 a(n) = n * A168361(n+1) if n>0. %F A280166 a(2*n) = A008574(n). a(2*n + 1) = - A005408(n). %F A280166 G.f.: (1 - x + x^2) * (1 + x^2) / (1 - x^2)^2. %e A280166 G.f. = 1 - x + 4*x^2 - 3*x^3 + 8*x^4 - 5*x^5 + 12*x^6 - 7*x^7 + 16*x^8 + ... %t A280166 a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -n, True, 2 n]; %t A280166 a[ n_] := SeriesCoefficient[ (1 - x + x^2) (1 + x^2) / (1 - x^2)^2, {x, 0, n}]; %o A280166 (PARI) {a(n) = if( n<1, n==0, n%2, -n, 2*n)}; %o A280166 (PARI) x='x+O('x^50); Vec((1-x+x^2)*(1+x^2)/(1-x^2)^2) \\ _G. C. Greubel_, Aug 04 2018 %o A280166 (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x+x^2)*(1+x^2)/(1-x^2)^2)); // _G. C. Greubel_, Aug 04 2018 %Y A280166 Cf. A005408, A008574, A168361, A257088. %K A280166 sign,easy %O A280166 0,3 %A A280166 _Michael Somos_, Dec 27 2016 %E A280166 Edited by _M. F. Hasler_, May 08 2018