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!)
A057079 Periodic sequence: repeat [1,2,1,-1,-2,-1]; expansion of (1+x)/(1-x+x^2). 66
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, 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, -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, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Inverse binomial transform of A057083. Binomial transform of A061347. The sums of consecutive pairs of elements give A084103. - Paul Barry, May 15 2003
Hexaperiodic sequence identical to its third differences. - Paul Curtz, Dec 13 2007
a(n+1) is the Hankel transform of A001700(n+1)-A001700(n). - Paul Barry, Apr 21 2009
Non-simple continued fraction expansion of 1 = 1+1/(2+1/(1+1/(-1+...))). - R. J. Mathar, Mar 08 2012
Pisano period lengths: 1, 3, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, ... - R. J. Mathar, Aug 10 2012
Alternating row sums of Riordan triangle A111125. - Wolfdieter Lang, Oct 18 2012
Periodic sequences of this type can be also calculated by a(n) = c + floor(q/(p^m-1)*p^n) mod p, where c is a constant, q is the number representing the periodic digit pattern and m is the period length. c, p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D, min = minimum value of elements in D. Than c := min, p := max - min + 1 and q := p^m*sum_{i=1..m} (D(i)-min)/p^i. Example: D = (1, 2, 1, -1, -2, -1), c = -2, m = 6, p = 5 and q = 12276 for this sequence. - Hieronymus Fischer, Jan 04 2013
LINKS
Alex Fink, Richard K. Guy, and Mark Krusemeyer, Partitions with parts occurring at most thrice, Contributions to Discrete Mathematics, Vol 3, No 2 (2008), pp. 76-114. See Section 13.
T.-X. He and L. W. Shapiro, Fuss-Catalan matrices, their weighted sums, and stabilizer subgroups of the Riordan group, Lin. Alg. Applic. 532 (2017) 25-41, theorem 2.5, k=3.
Tanya Khovanova, Recursive Sequences
FORMULA
a(n) = S(n, 1) + S(n-1, 1) = S(2*n, sqrt(3)); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, 1) = A010892(n).
a(n) = 2*cos((n-1)*Pi/3) = a(n-1) - a(n-2) = -a(n-3) = a(n-6) = (A022003(n+1)+1)*(-1)^floor(n/3). Unsigned a(n) = 4 - a(n-1) - a(n-2). - Henry Bottomley, Mar 29 2001
a(n) = (-1)^floor(n/3) + ((-1)^floor((n-1)/3) + (-1)^floor((n+1)/3))/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003
a(n) = (1/2 - sqrt(3)*i/2)^(n-1) + (1/2 + sqrt(3)*i/2)^(n-1) = cos(Pi*n/3) + sqrt(3)*sin(Pi*n/3). - Paul Barry, Mar 15 2004
The period 3 sequence (2, -1, -1, ...) has a(n) = 2*cos(2*Pi*n/3) = (-1/2 - sqrt(3)*i/2)^n + (-1/2 + sqrt(3)*i/2)^n. - Paul Barry, Mar 15 2004
Euler transform of length 6 sequence [2, -2, -1, 0, 0, 1]. - Michael Somos, Jul 14 2006
G.f.: (1 + x) / (1 - x + x^2) = (1 - x^2)^2 * (1 - x^3) / ((1 - x)^2 * (1 - x^6)). a(n) = a(2-n) for all n in Z. - Michael Somos, Jul 14 2006
a(n) = A033999(A002264(n))*(A000035(A010872(n))+1). - Hieronymus Fischer, Jun 20 2007
a(n) = (3*A033999(A002264(n)) - A033999(n))/2. - Hieronymus Fischer, Jun 20 2007
a(n) = (-1)^floor(n/3)*((n mod 3) mod 2 + 1). - Hieronymus Fischer, Jun 20 2007
a(n) = (3*(-1)^floor(n/3) - (-1)^n)/2. - Hieronymus Fischer, Jun 20 2007
a(n) = (-1)^((n-1)/3) + (-1)^((1-n)/3). - Jaume Oliver Lafont, May 13 2010
E.g.f.: E(x) = S(0), S(k) = 1 + 2*x/(6*k+1 - x*(6*k+1)/(4*(3*k+1) + x + 4*x*(3*k+1)/(6*k + 3 - x - x*(6*k+3)/(3*k + 2 + x - x*(3*k+2)/(12*k + 10 + x - x*(12*k+10)/(x - (6*k+6)/S(k+1))))))); (continued fraction). - Sergei N. Gladkovskii, Dec 14 2011
a(n) = -2 + floor((281/819)*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = -2 + floor((11/14)*5^(n+1)) mod 5. - Hieronymus Fischer, Jan 04 2013
a(n) = A010892(n) + A010892(n-1).
a(n) = ( (1+i*sqrt(3))^(n-1) + (1-i*sqrt(3))^(n-1) )/2^(n-1), where i=sqrt(-1). - Bruno Berselli, Dec 01 2014
a(n) = 2*sin((2n+1)*Pi/6). - Wesley Ivan Hurt, Apr 04 2015
a(n) = hypergeom([-n/2-2, -n/2-5/2], [-n-4], 4). - Peter Luschny, Dec 17 2016
G.f.: 1 / (1 - 2*x / (1 + 3*x / (2 - x))). - Michael Somos, Dec 29 2016
a(n) = (2*n+1)*(Sum_{k=0..n} ((-1)^k/(2*k+1))*binomial(n+k,2*k)) for n >= 0. - Werner Schulte, Jul 10 2017
Sum_{n>=0} (a(n)/(2*n+1))*x^(2*n+1) = arctan(x/(1-x^2)) for -1 < x < 1. - Werner Schulte, Jul 10 2017
EXAMPLE
G.f. = 1 + 2*x + x^2 - x^3 - 2*x^4 - x^5 + x^6 + 2*x^7 + x^8 - x^9 - 2*x^10 + x^11 + ...
MAPLE
A057079:=n->[1, 2, 1, -1, -2, -1][(n mod 6)+1]: seq(A057079(n), n=0..100); # Wesley Ivan Hurt, Mar 10 2015
MATHEMATICA
a[n_] := {1, 2, 1, -1, -2, -1}[[Mod[n, 6] + 1]]; Array[a, 100, 0] (* Jean-François Alcover, Jul 05 2013 *)
CoefficientList[Series[(1 + x)/(1 - x + x^2), {x, 0, 71}], x] (* Michael De Vlieger, Jul 10 2017 *)
PROG
(PARI) {a(n) = [1, 2, 1, -1, -2, -1][n%6 + 1]}; /* Michael Somos, Jul 14 2006 */
(PARI) {a(n) = if( n<0, n = 2-n); polcoeff( (1 + x) / (1 - x + x^2) + x * O(x^n), n)}; /* Michael Somos, Jul 14 2006 */
(PARI) a(n)=2^(n%3%2)*(-1)^(n\3) \\ Tani Akinari, Aug 15 2013
CROSSREFS
Cf. A049310. Apart from signs, same as A061347.
Sequence in context: A122876 A131713 A100063 * A132419 A131556 A107751
KEYWORD
easy,sign
AUTHOR
Wolfdieter Lang, Aug 04 2000
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 April 18 18:20 EDT 2024. Contains 371781 sequences. (Running on oeis4.)