|
| |
|
|
A007877
|
|
Period 4: repeat 0,1,2,1.
|
|
12
| |
|
|
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, 1, 0, 1, 2
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,3
|
|
|
COMMENTS
| Euler transform of finite sequence [2,-2,0,1]. - Michael Somos Sep 17 2004
This is the r=2 member in the r-family of sequences S_r(n) defined in A092184 where more information can be found.
A007877(n+1) is the transform of sqrt(1+2x)/sqrt(1-2x) (A063886) under the Chebyshev transformation A(x)->(1/(1+x^2))A(x/(1+x^2)). See also A084099. - Paul Barry (pbarry(AT)wit.ie), Oct 12 2004
Multiplicative with a(2) = 2, a(2^e) = 0 if e >= 2, a(p^e) = 1 otherwise. David W. Wilson (davidwwilson(AT)comcast.net) Jun 12, 2005.
The e.g.f. of 1,2,1,0,1,2,1,0,... (shifted left, offset zero) is exp(x) + sin(x).
|
|
|
LINKS
| Index entries for sequences related to Chebyshev polynomials.
Index to sequences with linear recurrences with constant coefficients, signature (1,-1,1).
|
|
|
FORMULA
| Multiplicative with a(p^e) = 2 if p = 2 and e = 0; 0 if p = 2 and e > 0; 1 if p > 2. - David W. Wilson (davidwwilson(AT)comcast.net), Aug 01, 2001.
a(n) = -sum{k=0..n, (-1)^C(k+2, 2)} (Offset -1) - Paul Barry (pbarry(AT)wit.ie), Jul 07 2003
a(n) = 1-cos(n*pi/2) a(n)=a(n-1)-a(n-2)+a(n-3) - Lee Reeves (leereeves(AT)fastmail.fm), May 10 2004
a(n) = -a(n-2)+2, n>=2, a(0)=0, a(1)=1.
a(n) = a(n-1)-a(n-2)+a(n-3), n>=3, a(0)=0, a(1)=1, a(2)=2.
G.f.: x*(1+x)/((1-x)*(1+x^2)) = x*(1+x)/(1-x+x^2-x^3).
a(n) = 1-T(n, 0)= 1-A056594(n) with Chebyshev's polynomials T(n, x) of the first kind. Note that T(n, 0)=S(n, 0).
a(n) = b(n) + b(n-1), n>=1, with b(n):=A021913(n+1) the partial sums of S(n, 0)= U(n, 0)=A056594(n)(Chebyshev's polynomials evaluated at x=0).
1 + (1/2){(-1)^[(n-1)/2] - (-1)^[n/2] }. - Ralf Stephan, Jun 09 2005
a(n) = 1/12*{5*(n mod 4)+5*[(n+1) mod 4]-[(n+2) mod 4]-[(n+3) mod 4]} - Paolo P. Lava (paoloplava(AT)gmail.com), Oct 20 2006
Non-reduced g.f.: x*(1+x)^2/(1-x^4) [From Jaume Oliver Lafont (joliverlafont(AT)gmail.com), Mar 27 2009]
a(n+1) = (S(n,sqrt(2))^2,n>=0, with the Chebyshev S-polynomials A049310. See the W. Lang link under A181878. W. Lang, Dec 15 2010.
Dirichlet g.f. (1+1/2^s-2/4^s)*zeta(s). - R. J. Mathar, Feb 24 2011
a(n) = n mod 4-2*(((n-2 mod 4) mod 3) mod 2), Paolo P. Lava, Mar 13 2011.
a(n) = (n mod 4)-(n^3 mod 4)+(n^2 mod 4). [From Gary Detlefs, Apr 17 2011]
a(n)= (n mod 2) + 2*floor(((n+1) mod 4)/3). [From Gary Detlefs, Jul 19 2011]
|
|
|
MATHEMATICA
| f[n_] := Mod[n, 4] - Mod[n^3, 4] + Mod[n^2, 4] (* Or *)
f[n_] := Mod[n, 2] + 2 Floor[Mod[n + 1, 4]/3] (* Or *)
f[n_] := Switch[Mod[n, 4], 0, 0, 1, 1, 2, 2, 3, 1]; Array[f, 105, 0] (* Robert G. Wilson v, Aug 08 2011 *)
|
|
|
PROG
| (PARI) a(n)=[0, 1, 2, 1][1+n%4] [From Jaume Oliver Lafont (joliverlafont(AT)gmail.com), Mar 27 2009]
|
|
|
CROSSREFS
| Sequence in context: A096661 A199339 A098178 * A118825 A118822 A054848
Adjacent sequences: A007874 A007875 A007876 * A007878 A007879 A007880
|
|
|
KEYWORD
| nonn,easy,mult
|
|
|
AUTHOR
| Christopher Lam Cham Kee (Topher(AT)CyberDude.Com)
|
|
|
EXTENSIONS
| Chebyshev comments from W. Lang (wolfdieter.lang(AT)physik.uni-karlsruhe.de), Sep 10 2004
|
| |
|
|