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.

A280167 a(2*n) = 3*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1.

This page as a plain text file.
%I A280167 #17 Sep 08 2022 08:46:18
%S A280167 1,-1,3,-3,6,-5,9,-7,12,-9,15,-11,18,-13,21,-15,24,-17,27,-19,30,-21,
%T A280167 33,-23,36,-25,39,-27,42,-29,45,-31,48,-33,51,-35,54,-37,57,-39,60,
%U A280167 -41,63,-43,66,-45,69,-47,72,-49,75,-51,78,-53,81,-55,84,-57,87,-59
%N A280167 a(2*n) = 3*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1.
%H A280167 G. C. Greubel, <a href="/A280167/b280167.txt">Table of n, a(n) for n = 0..5000</a>
%H A280167 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F A280167 b(n) = -a(n) for n > 0 is multiplicative with b(2^e) = -3 * 2^(e-1) if e > 0, b(p^e) = p^e for prime p > 2.
%F A280167 Euler transform of length 10 sequence [-1, 3, 0, 0, 1, 0, 0, 0, 0, -1].
%F A280167 G.f.: (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4).
%F A280167 G.f.: (1 - x) * (1 - x^10) / ((1 - x^2)^3 * (1 - x^5)).
%F A280167 a(n) = (-1)^n * A257143(n). a(n) = (-1)^n * A080512(n) if n>0.
%F A280167 a(n) + a(n+1) = A084964(n-1) if n>0.
%e A280167 G.f. = 1 - x + 3*x^2 - 3*x^3 + 6*x^4 - 5*x^5 + 9*x^6 - 7*x^7 + 12*x^8 + ...
%t A280167 a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -n, True, 3 n/2];
%t A280167 a[ n_] := SeriesCoefficient[ (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
%t A280167 Join[{1}, LinearRecurrence[{0,2,0,-1}, {-1,3,-3,6}, 50]] (* _G. C. Greubel_, Aug 01 2018 *)
%o A280167 (PARI) {a(n) = if( n<1, n==0, n%2, -n, 3*n/2)};
%o A280167 (PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x) * (1 - x^10) / ((1 - x^2)^3 * (1 - x^5)) + x * O(x^n), n))};
%o A280167 (Magma) I:=[-1,3,-3,6]; [1] cat [n le 4 select I[n] else 2*Self(n-2) - Self(n-4): n in [1..30]]; // _G. C. Greubel_, Aug 01 2018
%Y A280167 Cf. A080512, A084964, A257143.
%K A280167 sign,easy
%O A280167 0,3
%A A280167 _Michael Somos_, Dec 27 2016