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 A280569 #15 Sep 08 2022 08:46:18 %S A280569 1,-1,1,-1,1,-2,1,-1,1,-1,2,-1,1,-1,1,-2,1,-1,1,-1,2,-1,1,-1,1,-2,1, %T A280569 -1,1,-1,2,-1,1,-1,1,-2,1,-1,1,-1,2,-1,1,-1,1,-2,1,-1,1,-1,2,-1,1,-1, %U A280569 1,-2,1,-1,1,-1,2,-1,1,-1,1,-2,1,-1,1,-1,2,-1,1,-1,1 %N A280569 a(n) = (-1)^n * 2 if n = 5*k and n!=0, otherwise a(n) = (-1)^n. %H A280569 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,-1). %F A280569 Euler transform of length 10 sequence [-1, 1, 0, 0, -1, -1, 0, 0, 0, 1]. %F A280569 a(n) = -b(n) where b() is multiplicative with b(2^e) = -1 if e>0, b(5^e) = 2 if e>0, b(p^e) = 1 otherwise. %F A280569 G.f.: (1 - x + x^2) * (1 - x^3) / (1 + x^5). %F A280569 G.f.: 1 - x / (1 + x) - x^5 / (1 + x^5). %F A280569 a(n) = a(-n) for all n in Z. %F A280569 a(5*n) = A280560(n) for all n in Z. %e A280569 G.f. = 1 - x + x^2 - x^3 + x^4 - 2*x^5 + x^6 - x^7 + x^8 - x^9 + 2*x^10 + ... %t A280569 a[ n_] := (-1)^n If[ n != 0 && Divisible[n, 5], 2, 1]; %t A280569 LinearRecurrence[{0,0,0,0,-1},{1,-1,1,-1,1,-2},120] (* or *) PadRight[ {1},120,{2,-1,1,-1,1,-2,1,-1,1,-1}] (* _Harvey P. Dale_, Jul 18 2021 *) %o A280569 (PARI) {a(n) = (-1)^n * if(n && n%5==0, 2, 1)}; %o A280569 (PARI) {a(n) = n=abs(n); polcoeff( (1 - x + x^2) * (1 - x^3) / (1 + x^5) + x * O(x^n), n)}; %o A280569 (Magma) m:=75; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x+x^2)*(1-x^3)/(1+x^5))); // _G. C. Greubel_, Jul 29 2018 %Y A280569 Cf. A280560. %K A280569 sign %O A280569 0,6 %A A280569 _Michael Somos_, Jan 05 2017