cp's OEIS Frontend

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.

A098178 Expansion of (1+x)(1-x+x^2)/((1-x)(1+x^2)).

This page as a plain text file.
%I A098178 #32 Sep 08 2022 08:45:14
%S A098178 1,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,
%T A098178 0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,
%U A098178 2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2,1,0,1,2
%N A098178 Expansion of (1+x)(1-x+x^2)/((1-x)(1+x^2)).
%C A098178 Transform of A011782 under the Chebyshev mapping g(x)-> ((1-x^2)/(1+x^2)) * g(x/(1+x^2)).
%C A098178 Binomial transform is A098179.
%C A098178 Multiplicative with a(2) = 0, a(2^e) = 2 if e >= 2, a(p^e) = 1. [_David W. Wilson_, Jun 12 2005]
%C A098178 1, followed by period 4, repeat [1, 0, 1, 2]. [_Joerg Arndt_, Jan 06 2014]
%H A098178 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1, -1, 1).
%F A098178 G.f.: (1+x)(1-x+x^2)/((1-x)(1+x^2)).
%F A098178 a(n) = 1 + cos(Pi*n/2) - 0^n.
%F A098178 a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
%F A098178 a(n) = A007877(n+2), n>0. Dirichlet g.f. (1-1/2^s+2/4^s)*zeta(s). - _R. J. Mathar_, Feb 24 2011
%F A098178 a(n) = sign(n) - 1 + sqrt((n-2)^2 mod 8). - _Wesley Ivan Hurt_, Jan 04 2014
%F A098178 a(n) = a(n-4) for n>4. - _Wesley Ivan Hurt_, Jul 07 2016
%F A098178 E.g.f.: exp(x) + cos(x) - 1. - _Ilya Gutkovskiy_, Jul 07 2016
%p A098178 with(numtheory); A098178:=n->signum(n)-1+sqrt((n-2)^2 mod 8); seq(A098178(n), n=0..100); # _Wesley Ivan Hurt_, Jan 04 2014
%t A098178 CoefficientList[Series[(1+x)(1-x+x^2)/((1-x)(1+x^2)),{x,0,120}],x] (* or *) PadRight[{1},120,{2,1,0,1}] (* _Harvey P. Dale_, May 01 2013 *)
%t A098178 Table[Sign[n] - 1 + Sqrt[Mod[(n - 2)^2, 8]], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jan 04 2014 *)
%t A098178 Join[{1},LinearRecurrence[{1, -1, 1},{1, 0, 1},104]] (* _Ray Chandler_, Sep 03 2015 *)
%o A098178 (Magma) [1] cat &cat [[1, 0, 1, 2]^^30]; // _Wesley Ivan Hurt_, Jul 07 2016
%Y A098178 Cf. A007877, A098179.
%K A098178 easy,nonn,mult
%O A098178 0,5
%A A098178 _Paul Barry_, Aug 30 2004