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 A281727 #11 Mar 21 2017 11:17:07 %S A281727 1,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1, %T A281727 -2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1, %U A281727 2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1 %N A281727 a(n) = (-1)^n * 2 if n = 3*k and n!=0, otherwise a(n) = (-1)^n. %H A281727 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1). %F A281727 Euler transform of length 6 sequence [-1, 1, -1, -1, 0, 1]. %F A281727 a(n) = -b(n) where b() is multiplicative with b(2^e) = -1 if e>0, b(3^e) = 2 if e>0, b(p^e) = 1 otherwise. %F A281727 G.f.: 1 - x / (1 + x) - x^3 / (1 + x^3). %F A281727 G.f.: (1 - x + x^2 - x^3) / (1 + x^3). %F A281727 G.f.: (1 - x) * (1 - x^3) * (1 - x^4) / ((1 - x^2) * (1 - x^6)). %F A281727 a(n) = a(-n) for all n in Z. %F A281727 a(3*n) = A280560(n) for all n in Z. %e A281727 G.f. = 1 - x + x^2 - 2*x^3 + x^4 - x^5 + 2*x^6 - x^7 + x^8 - 2*x^9 + ... %t A281727 a[ n_] := {2, -1, 1, -2, 1, -1}[[Mod[n, 6] + 1]] - Boole[n == 0]; %t A281727 a[ n_] := (-1)^n If[ n != 0 && Divisible[n, 3], 2, 1]; %t A281727 a[ n_] := SeriesCoefficient[ (1 - x + x^2 - x^3) / (1 + x^3), {x, 0, Abs[n]}]; %o A281727 (PARI) {a(n) = (-1)^n * if(n && n%3==0, 2, 1)}; %o A281727 (PARI) {a(n) = [2, -1, 1, -2, 1, -1][n%6 + 1] - (n==0)}; %o A281727 (PARI) {a(n) = n=abs(n); polcoeff( (1 - x + x^2 - x^3) / (1 + x^3) + x * O(x^n), n)}; %Y A281727 Cf. A280560. %K A281727 sign %O A281727 0,4 %A A281727 _Michael Somos_, Jan 28 2017