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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A006130 a(n) = a(n-1) + 3a(n-2), a(0) = a(1) = 1.
(Formerly M3314)
47
1, 1, 4, 7, 19, 40, 97, 217, 508, 1159, 2683, 6160, 14209, 32689, 75316, 173383, 399331, 919480, 2117473, 4875913, 11228332, 25856071, 59541067, 137109280, 315732481, 727060321, 1674257764, 3855438727, 8878212019, 20444528200 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Counts walks of length n at the vertex of degree five in the graph with adjacency matrix A=[1,1,1,1;1,0,0,0;1,0,0,0;1,0,0,0]. - Paul Barry, Oct 02 2004

Form the graph with matrix A=[0,1,1,1;1,1,0,0;1,0,1,0;1,0,0,1]. The sequence 0,1,1,4,... counts walks of length n between the vertex without loop and another vertex. - Paul Barry, Oct 02 2004

Length-n strings with letters {0,1,2,3} where no two consecutive letters are nonzero, see fxtbook link below. [Joerg Arndt, Apr 08 2011]

Hankel transform is the sequence [1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...] - Philippe DELEHAM, Nov 10 2007

Let M = [1, sqrt(3); sqrt(3), 0] be a 2X2 matrix. Then A006130={[M^n]_(1,1)}. Note that A006130 - A052533 = A006130 (shifted to the right one place, with first term = 0). -- L. Edson Jeffery, Nov 25, 2011.

The compositions of n  in which each natural number is colored by one of  p different colors are called p-colored compositions of n.  For n>=2, 4*a(n-2) equals the number of 4-colored compositions of n with all parts >=2, such that  no adjacent parts have  the same color. - Milan Janjic, Nov 26 2011

REFERENCES

Arulalan Rajan, R. Vittal Rao, Ashok Rao and H. S. Jamadagni, Fibonacci Sequence, Recurrence Relations, Discrete Probability Distributions and Linear Convolution, Arxiv preprint arXiv:1205.5398, 2012. - From N. J. A. Sloane, Oct 23 2012

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

A. K. Whitford, Binet's formula generalized, Fib. Quart., 15 (1977), pp. 21, 24, 29.

Stephen Wolfram, 'The Mathematica Book,' Fourth Edition, Wolfram Media or Cambridge University Press, 1999, p. 96.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..149

Joerg Arndt, Fxtbook, pp.317-318

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 436

_Simon Plouffe_, Approximations de S\'{e}ries G\'{e}n\'{e}ratrices et Quelques Conjectures, Dissertation, Universit\'{e} du Qu\'{e}bec \`{a} Montr\'{e}al, 1992.

_Simon Plouffe_, 1031 Generating Functions and Conjectures, Universit\'{e} du Qu\'{e}bec \`{a} Montr\'{e}al, 1992.

Index to sequences with linear recurrences with constant coefficients, signature (1,3).

FORMULA

O.g.f. 1/(1-x-3*x^2) - Franklin T. Adams-Watters, May 26 2011.

a(n) = {[ (1+sqrt(13))/2 ]^(n+1) - [ (1-sqrt(13))/2 ]^(n+1)}/sqrt(13).

a(n) = sum(k=0, ceil(n/2), 3^k*C(n-k, k)) - Benoit Cloitre - Philippe Deléham, Mar 07 2004

a(0) = 1; a(1) = 1; for n>=1, a(n+1) = (a(n)^2 - (-3)^n) / a(n-1) . - Philippe Deléham, Mar 07 2004

a(0) = 1; a(1) = 1; for n>=1, a(n+1) = a(n) + 3*a(n-1) - Alex Ratushnyak, Apr 20 2012

The i-th term of the sequence is the (1, 2) entry in the i-th power of the 2 by 2 matrix M=((-1, 1), (1, 2)). - Simone Severini, Oct 15 2005

a(n) = lower right term in the 2 X 2 matrix [0,3; 1,1]^n - Gary W. Adamson, Mar 02 2008

a(n) = Sum_{k, 0<=k<=n} A109466(n,k)*(-3)^(n-k). [From Philippe DELEHAM, Oct 26 2008]

a(n) = Product[(1 + 12*cos[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]. [From Roger L. Bagula and Gary W. Adamson, Nov 21 2008]

Limiting ratio = (1 + sqrt(13))/2 = 2.30277563.. = A098316 - 1. [From Roger L. Bagula and Gary W. Adamson, Nov 21 2008]

MAPLE

a:=n->sum(binomial(n-k, k)*3^k, k=0..n): seq(a(n), n=0..29); - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Sep 30 2006

A006130:=-1/(-1+z+3*z**2); [Simon Plouffe in his 1992 dissertation.]

MATHEMATICA

a[0] = a[1] = 1; a[n_] := a[n] = a[n - 1] + 3a[n - 2]; Table[ a[n], {n, 0, 30}]

f[n_] = Product[(1 + 12*Cos[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; Table[FullSimplify[ExpandAll[f[n]]], {n, 0, 15}] N[%] [From Roger L. Bagula and Gary W. Adamson, Nov 21 2008]

LinearRecurrence[{1, 3}, {1, 1}, 100] (* Vincenzo Librandi, Oct 17 2012 *)

PROG

(Sage) from sage.combinat.sloane_functions import recur_gen2 sage: it = recur_gen2(1, 1, 1, 3) sage: [it.next() for i in range(30)] - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jun 25 2008

(Sage) [lucas_number1(n, 1, -3) for n in xrange(1, 31)] # [From Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Apr 22 2009]

(PARI) Vec(1/(1-x-3*x^2+O(x^30))) /* Franklin T. Adams-Watters, May 26 2011 */

(Python)

an = an1 = 1

while an<10**15:

. print an,

. an1 += an*3

. an = an1 - an*3   # Alex Ratushnyak, Apr 20 2012

(MAGMA) I:=[1, 1]; [n le 2 select I[n] else Self(n - 1) + 3*Self(n - 2): n in [1..40]]; // Vincenzo Librandi, Oct 17 2012

CROSSREFS

Cf. A006131, A015440, A052533, A140167, A175291 (Pisano periods)

Sequence in context: A102991 A062306 A140167 * A182228 A182646 A190646

Adjacent sequences:  A006127 A006128 A006129 * A006131 A006132 A006133

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

EXTENSIONS

Edited by Alex Ratushnyak, Apr 20 2012

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified May 22 20:46 EDT 2013. Contains 225583 sequences.