login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061347 Period 3: repeat [1, 1, -2]. 42
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, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2, 1, 1, -2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

WARNING: It is unclear whether this sequence should start at offset 1 (as written) or offset 0 (in analogy to many similar sequences, which seems to be assumed in many of the given formulas).

Inverse binomial transform of A057079. - Paul Barry, May 15 2003

The unsigned version, with g.f. (1+x+2x^2)/(1-x^3), has a(n) = 4/3-cos(2*Pi*n/3)/3-sqrt(3)*sin(2*Pi*n/3)/3 = gcd(fib(n+4), fib(n+1)). - Paul Barry, Apr 02 2004

a(n) = L(n-2,-1), where L is defined as in A108299; see also A010892 for L(n,+1). - Reinhard Zumkeller, Jun 01 2005

From the Taylor expansion of log(1+x+x^2) at x=1, Sum_{k>0} a(k)/k = log(3) = A002391. This is case n=3 of the general expression Sum_{k>0} (1-n*!(k%n))/k = log(n). - Jaume Oliver Lafont, Oct 16 2009

If used with offset zero, a non-simple continued fraction representation of 2+sqrt(2). - R. J. Mathar, Mar 08 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, 1, -2), c = -2, p = 4 and q = 60 for this sequence. - Hieronymus Fischer, Jan 04 2013

LINKS

Table of n, a(n) for n=1..108.

Ralph E. Griswold, Shaft Sequences

Tanya Khovanova, Recursive Sequences

Index entries for linear recurrences with constant coefficients, signature (-1,-1).

FORMULA

a(n) = A057079(2n). a(n) = - a(n-1) - a(n-2) with a(0) = a(1) = 1.

G.f.: (1+2*x)/(1+x+x^2). a(n) = (-1)^floor(2n/3)+((-1)^floor((2n-1)/3)+ (-1)^floor((2n+1)/3))/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003

a(n) = -(n mod 3)+(n+1) mod 3. - Paolo P. Lava, Oct 20 2006

a(n) = -2*cos(2*Pi*n/3). - Jaume Oliver Lafont, May 06 2008

Dirichlet g.f. zeta(s)*(1-1/3^(s-1)). - R. J. Mathar, Feb 09 2011

a(n) = n * Sum_{k=1..n} binomial(k,n-k)/k*(-1)^(k+1). - Dmitry Kruchinin, Jun 03 2011

a(n) = -2+floor(110/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013

a(n) = -2+floor(20/21*4^(n+1)) mod 4. - Hieronymus Fischer, Jan 04 2013

a(n) = a(n-3) for n>3. - Wesley Ivan Hurt, Jul 01 2016

E.g.f.: 2 - 2*cos(sqrt(3)*x/2)*exp(-x/2). - Ilya Gutkovskiy, Jul 01 2016

a(n) = (-1)^n*hypergeom([-n/2-1, -n/2-3/2], [-n-2], 4). - Peter Luschny, Dec 17 2016

MAPLE

seq(op([1, 1, -2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016

MATHEMATICA

a[n_] := {1, 1, -2}[[Mod[n - 1, 3] + 1]]; Table[a[n], {n, 108}] (* Jean-Fran├žois Alcover, Jul 19 2013 *)

PROG

(PARI) a(n)=1-3*!(n%3) \\ Jaume Oliver Lafont, Oct 16 2009

(Sage)

def A061347():

    x, y = -1, -1

    while true:

        yield -x

        x, y = y, -x -y

a = A061347(); [a.next() for i in range(40)] # Peter Luschny, Jul 11 2013

(MAGMA) &cat [[1, 1, -2]^^30]; // Wesley Ivan Hurt, Jul 01 2016

CROSSREFS

Apart from signs, same as A057079, A100063. Cf. A000045, A010892 for the rules a(n) = a(n - 1) + a(n - 2), a(n) = a(n - 1) - a(n - 2). a(n) = - a(n - 1) + a(n - 2) gives a signed version of Fibonacci numbers.

Cf. A002391, A108299.

Alternating row sums of A130777: repeat(1,-2,1).

Sequence in context: A101825 A177702 A131534 * A115579 A115573 A152851

Adjacent sequences:  A061344 A061345 A061346 * A061348 A061349 A061350

KEYWORD

sign,easy,mult

AUTHOR

Jason Earls (zevi_35711(AT)yahoo.com), Jun 07 2001

EXTENSIONS

Better definition from M. F. Hasler, Jan 13 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified August 22 22:36 EDT 2017. Contains 290952 sequences.