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 A255368 #29 Dec 29 2022 06:30:34 %S A255368 0,1,-2,2,-4,5,-4,7,-8,6,-10,11,-8,13,-14,10,-16,17,-12,19,-20,14,-22, %T A255368 23,-16,25,-26,18,-28,29,-20,31,-32,22,-34,35,-24,37,-38,26,-40,41, %U A255368 -28,43,-44,30,-46,47,-32,49,-50,34,-52,53,-36,55,-56,38,-58,59 %N A255368 a(n) = -(-1)^n * 2 * n / 3 if n divisible by 3, a(n) = -(-1)^n * n otherwise. %H A255368 G. C. Greubel, <a href="/A255368/b255368.txt">Table of n, a(n) for n = 0..2500</a> %H A255368 Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.txt">Rational function multiplicative coefficients</a>. %H A255368 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-2,0,0,-1). %F A255368 Euler transform of length 6 sequence [-2, 1, -2, -1, 0, 2]. %F A255368 a(n) is multiplicative with a(2^e) = -(2^e) if e>0, a(3^e) = 2 * 3^(e-1) if e>0, otherwise a(p^e) = p^e. %F A255368 G.f.: f(x) - f(x^3) where f(x) := x / (1 + x)^2. %F A255368 G.f.: x * (1 - x)^2 * (1 + x^2) / (1 + x^3)^2. %F A255368 G.f.: x * (1 - x)^2 * (1 - x^3)^2 * (1 - x^4) / ((1 - x^2) * (1 - x^6)^2). %F A255368 a(n) = -a(-n) = -(-1)^n * A186101(n) for all n in Z. %F A255368 Dirichlet g.f.: zeta(s-1)*(2^s-4)*(3^s-1)/6^s. - _Amiram Eldar_, Dec 29 2022 %e A255368 G.f. = x - 2*x^2 + 2*x^3 - 4*x^4 + 5*x^5 - 4*x^6 + 7*x^7 - 8*x^8 + 6*x^9 + ... %t A255368 a[ n_] := -(-1)^n If[ Divisible[ n, 3], 2 n/3, n]; %t A255368 a[ n_] := n {1, -1, 2/3, -1, 1, -2/3}[[Mod[n, 6, 1]]]; %t A255368 CoefficientList[Series[x*(1-x)^2*(1+x^2)/(1+x^3)^2, {x,0,60}], x] (* _G. C. Greubel_, Aug 02 2018 *) %o A255368 (PARI) {a(n) = -(-1)^n * if( n%3, n, 2*n/3)}; %o A255368 (PARI) my(x='x+O('x^60)); concat([0], Vec(x*(1-x)^2*(1+x^2)/(1+x^3)^2)) \\ _G. C. Greubel_, Aug 02 2018 %o A255368 (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1-x)^2*(1+x^2)/(1+x^3)^2)); // _G. C. Greubel_, Aug 02 2018 %Y A255368 Cf. A186101. %K A255368 sign,mult,easy %O A255368 0,3 %A A255368 _Michael Somos_, May 04 2015