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.

A131259 a(2*n) = A000217(n), a(2*n+1) = -2*A000217(n).

This page as a plain text file.
%I A131259 #18 Jan 23 2025 00:17:15
%S A131259 0,0,1,-2,3,-6,6,-12,10,-20,15,-30,21,-42,28,-56,36,-72,45,-90,55,
%T A131259 -110,66,-132,78,-156,91,-182,105,-210,120,-240,136,-272,153,-306,171,
%U A131259 -342,190,-380,210,-420,231,-462,253,-506,276,-552,300,-600,325,-650,351,-702,378,-756,406,-812,435,-870,465,-930,496,-992
%N A131259 a(2*n) = A000217(n), a(2*n+1) = -2*A000217(n).
%H A131259 G. C. Greubel, <a href="/A131259/b131259.txt">Table of n, a(n) for n = 0..5000</a>
%H A131259 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-3,0,1).
%F A131259 O.g.f.: ogf217(x^2) - 2*x*ogf217(x^2) =  x^2/(1-x^2)^3 - 2*x^3/(1-x^2) = x^2*(1 - 2*x) / (1 - x^2)^3. - _Georg Fischer_, Nov 16 2022
%F A131259 From _G. C. Greubel_, Jan 22 2025: (Start)
%F A131259 a(n) = (1/16)*(2*(1-(-1)^n) + 2*(1+(-1)^n)*n - (1-3*(-1)^n)*n^2).
%F A131259 E.g.f.: (1/8)*(x-2)*(x*cosh(x) - (1+2*x)*sinh(x)). (End)
%p A131259 A000217 := proc(n) n*(n+1)/2 ; end: A131259 := proc(n) if n mod 2 = 0 then A000217(n/2) ; else -2*A000217((n-1)/2) ; fi ; end: seq(A131259(n),n=0..60) ; # _R. J. Mathar_, Oct 26 2007
%t A131259 CoefficientList[Series[x^2*(1 - 2*x)/(1 - x^2)^3, {x,0,35}], x] (* _Georg Fischer_, Nov 16 2022 *)
%t A131259 LinearRecurrence[{0,3,0,-3,0,1},{0,0,1,-2,3,-6},70] (* _Harvey P. Dale_, Jul 07 2024 *)
%o A131259 (Magma)
%o A131259 A131259:= func< n | (2*(n mod 2) +2*((n+1) mod 2)*n -((n mod 2) -(-1)^n)*n^2 )/8 >;
%o A131259 [A131259(n): n in [0..70]]; // _G. C. Greubel_, Jan 22 2025
%o A131259 (Python)
%o A131259 def A131259(n): return (2*(n%2) +2*((n+1)%2)*n -(3*(n%2)-1)*n**2)//8
%o A131259 print([A131259(n) for n in range(71)]) # _G. C. Greubel_, Jan 22 2025
%Y A131259 Cf. A000217, A129819.
%K A131259 sign,easy
%O A131259 0,4
%A A131259 _Paul Curtz_, Sep 28 2007
%E A131259 More terms from _R. J. Mathar_, Oct 26 2007