The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280167 a(2*n) = 3*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1. 1
1, -1, 3, -3, 6, -5, 9, -7, 12, -9, 15, -11, 18, -13, 21, -15, 24, -17, 27, -19, 30, -21, 33, -23, 36, -25, 39, -27, 42, -29, 45, -31, 48, -33, 51, -35, 54, -37, 57, -39, 60, -41, 63, -43, 66, -45, 69, -47, 72, -49, 75, -51, 78, -53, 81, -55, 84, -57, 87, -59 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
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.
Euler transform of length 10 sequence [-1, 3, 0, 0, 1, 0, 0, 0, 0, -1].
G.f.: (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4).
G.f.: (1 - x) * (1 - x^10) / ((1 - x^2)^3 * (1 - x^5)).
a(n) = (-1)^n * A257143(n). a(n) = (-1)^n * A080512(n) if n>0.
a(n) + a(n+1) = A084964(n-1) if n>0.
EXAMPLE
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 + ...
MATHEMATICA
a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -n, True, 3 n/2];
a[ n_] := SeriesCoefficient[ (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
Join[{1}, LinearRecurrence[{0, 2, 0, -1}, {-1, 3, -3, 6}, 50]] (* G. C. Greubel, Aug 01 2018 *)
PROG
(PARI) {a(n) = if( n<1, n==0, n%2, -n, 3*n/2)};
(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))};
(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
CROSSREFS
Sequence in context: A265008 A165606 A295220 * A257143 A080512 A225441
KEYWORD
sign,easy
AUTHOR
Michael Somos, Dec 27 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 08:10 EDT 2024. Contains 372579 sequences. (Running on oeis4.)