[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098178 Expansion of (1+x)(1-x+x^2)/((1-x)(1+x^2)). 6
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Transform of A011782 under the Chebyshev mapping g(x)-> ((1-x^2)/(1+x^2)) * g(x/(1+x^2)).
Binomial transform is A098179.
Multiplicative with a(2) = 0, a(2^e) = 2 if e >= 2, a(p^e) = 1. [David W. Wilson, Jun 12 2005]
1, followed by period 4, repeat [1, 0, 1, 2]. [Joerg Arndt, Jan 06 2014]
LINKS
FORMULA
G.f.: (1+x)(1-x+x^2)/((1-x)(1+x^2)).
a(n) = 1 + cos(Pi*n/2) - 0^n.
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
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
a(n) = sign(n) - 1 + sqrt((n-2)^2 mod 8). - Wesley Ivan Hurt, Jan 04 2014
a(n) = a(n-4) for n>4. - Wesley Ivan Hurt, Jul 07 2016
E.g.f.: exp(x) + cos(x) - 1. - Ilya Gutkovskiy, Jul 07 2016
MAPLE
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
MATHEMATICA
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 *)
Table[Sign[n] - 1 + Sqrt[Mod[(n - 2)^2, 8]], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 04 2014 *)
Join[{1}, LinearRecurrence[{1, -1, 1}, {1, 0, 1}, 104]] (* Ray Chandler, Sep 03 2015 *)
PROG
(Magma) [1] cat &cat [[1, 0, 1, 2]^^30]; // Wesley Ivan Hurt, Jul 07 2016
CROSSREFS
Sequence in context: A323202 A118825 A007877 * A118822 A230074 A230075
KEYWORD
easy,nonn,mult
AUTHOR
Paul Barry, Aug 30 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 09:16 EDT 2024. Contains 375511 sequences. (Running on oeis4.)