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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A071618 a(n+1) - 3*a(n) + a(n-1) = (2/3)(1+w^(n+1)+w^(2n+2)), where w = exp(2 Pi I / 3). 4
 0, 1, 3, 8, 23, 61, 160, 421, 1103, 2888, 7563, 19801, 51840, 135721, 355323, 930248, 2435423, 6376021, 16692640, 43701901, 114413063, 299537288, 784198803, 2053059121, 5374978560, 14071876561, 36840651123, 96450076808, 252509579303 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS The sequence is closely related to the third term in the continued fraction expansion of 2(F(4n)+F(2n))/phi where F is the Fibonacci sequence. For any k smaller than a(n), k*F(2n)*phi has to be rounded by excess, for any k greater than a(n), k*F(2n)*phi has to be rounded by default. - Thomas Baruchel, Aug 31 2004 LINKS Harvey P. Dale, Table of n, a(n) for n = 0..1000 S. Lafortune, A. Ramani, B. Grammaticos, Y. Ohta and K.M. Tamizhmani, Blending two discrete integrability criteria: ... Index entries for linear recurrences with constant coefficients, signature (3,-1,1,-3,1). FORMULA a(n) = floor ( phi^2n / 2 ) = floor ( (Lucas(2n)-1) / 2 ). - Thomas Baruchel, Aug 31 2004 a(-n) = a(n). a(n) = 2*a(n-1) + a(n-2) + 2*a(n-3) - a(n-4) + 2. - Michael Somos, Mar 08 2007 G.f.: x*(1+x^3) / ((1-x^3)* (1-3*x+x^2)). - Michael Somos, Mar 08 2007 a(0)=0, a(1)=1, a(2)=3, a(3)=8, a(4)=23, a(n) = 3*a(n-1) - a(n-2) + a(n-3) - 3*a(n-4) + a(n-5). - Harvey P. Dale, Dec 18 2011 MATHEMATICA a[ -1 ] = 0; a[ 0 ] = 1; w = Exp[ 2Pi*I/3 ]; a[ n_ ] := a[ n ] = Simplify[ (2/3)(1 + w^n + w^(2n)) + 3a[ n - 1 ] - a[ n - 2 ] ]; Table[ a[ n ], {n, -1, 28} ] LinearRecurrence[{3, -1, 1, -3, 1}, {0, 1, 3, 8, 23}, 30] (* or *) CoefficientList[ Series[x (1+x^3)/((1-x^3)*(1-3x+x^2)), {x, 0, 30}], x] (* Harvey P. Dale, Dec 18 2011 *) PROG (PARI) u=0; v=1; for(n=1, 30, print1(a=3*v-u+2*!(n%3), " "); u=v; v=a) /* Thomas Baruchel */ (PARI) {a(n)= ( fibonacci(2*n+1)+ fibonacci(2*n-1)+ (n%3>0))/2- 1 } /* Michael Somos, Mar 08 2007 */ (PARI) {a(n)= n=abs(n); polcoeff( x*(1+x^3)/ ((1-x^3)* (1-3*x+x^2)) +x*O(x^n), n)} /* Michael Somos, Mar 08 2007 */ CROSSREFS Sequence in context: A353169 A027244 A108457 * A318861 A318819 A146998 Adjacent sequences: A071615 A071616 A071617 * A071619 A071620 A071621 KEYWORD nonn,easy AUTHOR N. J. A. Sloane, Jun 21 2002 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.

Last modified October 1 17:28 EDT 2023. Contains 365827 sequences. (Running on oeis4.)