login
A280057
a(n) = (-1)^n * 4*n/3 if n = 3*k and n!=0, otherwise a(n) = (-1)^n * n except a(0) = 1.
1
1, -1, 2, -4, 4, -5, 8, -7, 8, -12, 10, -11, 16, -13, 14, -20, 16, -17, 24, -19, 20, -28, 22, -23, 32, -25, 26, -36, 28, -29, 40, -31, 32, -44, 34, -35, 48, -37, 38, -52, 40, -41, 56, -43, 44, -60, 46, -47, 64, -49, 50, -68, 52, -53, 72, -55, 56, -76, 58, -59
OFFSET
0,3
COMMENTS
This is a divisibility sequence.
FORMULA
Euler transform of length 10 sequence [-1, 2, -2, -1, 1, 2, 0, 0, 0, -1]. - Michael Somos, Dec 29 2016
a(n) = -b(n) where b() is multiplicative with b(2^e) = -(2^e) if e>0, b(3^e) = 4*3^(e-1) if e>0, a(p^e) = p^e otherwise.
G.f.: 1 - x / (1 + x)^2 - x^3 / (1 + x^3)^2.
G.f.: (1 + x^2) * (1 + x^5) / ((1 + x) * (1 + x^3)^2).
G.f.: (1 - x) * (1 - x^3)^2 * (1 - x^4) * (1 - x^10) / ((1 - x^2)^2 * (1 - x^5) * (1 - x^6)^2).
a(n) = (-1)^n * A257174(n).
EXAMPLE
G.f. = 1 - x + 2*x^2 - 4*x^3 + 4*x^4 - 5*x^5 + 8*x^6 - 7*x^7 + 8*x^8 + ...
MATHEMATICA
a[ n_] := If[ n < 1, Boole[n == 0], (-1)^n n If[ Mod[n, 3] > 0, 1, 4/3]];
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (1 + x^2) (1 + x^5) / ((1 + x) (1 + x^3)^2), {x, 0, n}]];
PROG
(PARI) {a(n) = if( n<1, n==0, (-1)^n * n * if( n%3, 1, 4/3))};
(PARI) {a(n) = if( n<0, 0, polcoeff( (1 + x^2) * (1 + x^5) / ((1 + x) * (1 + x^3)^2) + x * O(x^n), n))};
(PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x) * (1 - x^3)^2 * (1 - x^4) * (1 - x^10) / ((1 - x^2)^2 * (1 - x^5) * (1 - x^6)^2) + x * O(x^n), n))};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 + x^2)*(1+x^5)/((1+x)*(1+x^3)^2))); // G. C. Greubel, Jul 29 2018
CROSSREFS
Cf. A257174.
Sequence in context: A035625 A219875 A132128 * A257174 A327625 A084824
KEYWORD
sign
AUTHOR
Michael Somos, Dec 29 2016
STATUS
approved