cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A128588 Expansion of g.f. x*(1+x+x^2)/(1-x-x^2).

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 1

Views

Author

Gary W. Adamson, Mar 11 2007

Keywords

Comments

Previous name was: A007318 * A128587.
a(n)/a(n-1) tends to phi, 1.618... = A001622.
Regardless of initial two terms, any linearly recurring sequence with signature (1,1) will yield an a(n)/a(n+1) ratio tending to phi (the Golden Ratio). - Harvey P. Dale, Mar 29 2017
Apart from the initial term, double the Fibonacci numbers. O.g.f.: x*(1+x+x^2)/(1-x-x^2). a(n) gives the number of binary strings of length n-1 avoiding the substrings 000 and 111. a(n) also gives the number of binary strings of length n-1 avoiding the substrings 010 and 101. - Peter Bala, Jan 22 2008
Row lengths of triangle A232642. - Reinhard Zumkeller, May 14 2015
a(n) is the number of binary strings of length n-1 avoiding the substrings 000 and 111. - Allan C. Wechsler, Feb 13 2025

Crossrefs

Programs

  • GAP
    Concatenation([1], List([2..40], n-> 2*Fibonacci(n))); # G. C. Greubel, Jul 10 2019
  • Haskell
    a128588 n = a128588_list !! (n-1)
    a128588_list = 1 : cows where
                       cows = 2 : 4 : zipWith (+) cows (tail cows)
    -- Reinhard Zumkeller, May 14 2015
    
  • Magma
    [1] cat [2*Fibonacci(n): n in [2..40]]; // G. C. Greubel, Jul 10 2019
    
  • Maple
    a:= n-> `if`(n<2, n, 2*(<<0|1>, <1|1>>^n)[1,2]):
    seq(a(n), n=1..50);  # Alois P. Heinz, Apr 28 2018
  • Mathematica
    nn=40; a=(1-x^3)/(1-x); b=x*(1-x^2)/(1-x); CoefficientList[Series[a^2 /(1-b^2), {x,0,nn}], x]  (* Geoffrey Critzer, Sep 01 2012 *)
    LinearRecurrence[{1,1}, {1,2,4}, 40] (* Harvey P. Dale, Mar 29 2017 *)
    Join[{1}, 2*Fibonacci[Range[2,40]]] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    {a(n) = if( n<2, n==1, 2 * fibonacci(n))}; /* Michael Somos, Jul 18 2015 */
    
  • Sage
    [1]+[2*fibonacci(n) for n in (2..40)] # G. C. Greubel, Jul 10 2019
    

Formula

G.f.: x*(1+x+x^2)/(1-x-x^2).
Binomial transform of A128587; a(n+2) = a(n+1) + a(n), n>3.
a(n) = A068922(n-1), n>2. - R. J. Mathar, Jun 14 2008
For n > 1: a(n+1) = a(n) + if a(n) odd then max{a(n),a(n-1)} else min{a(n),a(n-1)}, see also A038754. - Reinhard Zumkeller, Oct 19 2015
E.g.f.: 4*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5) - x. - Stefano Spezia, Feb 19 2023

Extensions

New name from Joerg Arndt, Feb 16 2024

A069403 a(n) = 2*Fibonacci(2*n+1) - 1.

Original entry on oeis.org

1, 3, 9, 25, 67, 177, 465, 1219, 3193, 8361, 21891, 57313, 150049, 392835, 1028457, 2692537, 7049155, 18454929, 48315633, 126491971, 331160281, 866988873, 2269806339, 5942430145, 15557484097, 40730022147, 106632582345, 279167724889, 730870592323, 1913444052081
Offset: 0

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Comments

Half the number of n X 3 binary arrays with a path of adjacent 1's and a path of adjacent 0's from top row to bottom row.
Indices of A017245 = 9*n + 7 = 7, 16, 25, 34, for submitted A153819 = 16, 34, 88,. A153819(n) = 9*a(n) + 7 = 18*F(2*n+1) -2; F(n) = Fibonacci = A000045, 2's = A007395. Other recurrence: a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3). - Paul Curtz, Jan 02 2009

Crossrefs

Cf. 1 X n A000225, 2 X n A016269, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.
Equals A052995 - 1.
Bisection of A001595, A062114, A066983.

Programs

  • GAP
    List([0..30], n-> 2*Fibonacci(2*n+1)-1); # G. C. Greubel, Jul 11 2019
  • Magma
    [2*Fibonacci(2*n+1)-1: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011
    
  • Mathematica
    a[n_]:= a[n] = 3a[n-1] - 3a[n-3] + a[n-4]; a[0] = 1; a[1] = 3; a[2] = 9; a[3] = 25; Table[ a[n], {n, 0, 30}]
    Table[2*Fibonacci[2*n+1]-1, {n,0,30}] (* G. C. Greubel, Apr 22 2018 *)
    LinearRecurrence[{4,-4,1},{1,3,9},30] (* Harvey P. Dale, Sep 22 2020 *)
  • PARI
    a(n) = 2*fibonacci(2*n+1)-1 \\ Charles R Greathouse IV, Jun 11 2015
    
  • PARI
    Vec((1-x+x^2)/((1-x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Nov 02 2016
    
  • Sage
    [2*fibonacci(2*n+1)-1 for n in (0..30)] # G. C. Greubel, Jul 11 2019
    

Formula

a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 25; a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
a(n) = 3*a(n-1) - a(n-2) + 1 for n>1, a(1) = 3, a(0) = 0. - Reinhard Zumkeller, May 02 2006
From R. J. Mathar, Feb 23 2009: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
G.f.: (1-x+x^2)/((1-x)*(1-3*x+x^2)). (End)
a(n) = 1 + 2*Sum_{k=0..n} Fibonacci(2*k) = 1+2*A027941(n). - Gary Detlefs, Dec 07 2010
a(n) = (2^(-n)*(-5*2^n -(3-sqrt(5))^n*(-5+sqrt(5)) +(3+sqrt(5))^n*(5+sqrt(5))))/5. - Colin Barker, Nov 02 2016

Extensions

Simpler definition from Vladeta Jovovic, Mar 19 2003

A153981 a(n) = 36*Fibonacci(2*n+1) - 4.

Original entry on oeis.org

32, 68, 176, 464, 1220, 3200, 8384, 21956, 57488, 150512, 394052, 1031648, 2700896, 7071044, 18512240, 48465680, 126884804, 332188736, 869681408, 2276855492, 5960885072, 15605799728, 40856514116, 106963742624, 280034713760, 733140398660
Offset: 0

Views

Author

Paul Curtz, Jan 04 2009

Keywords

Programs

  • Magma
    [36*Fibonacci(2*n+1)-4: n in [0..30]]; // Vincenzo Librandi, Aug 07 2011
  • Mathematica
    36*Fibonacci[2*Range[0,30]+1]-4 (* or *) LinearRecurrence[{4,-4,1},{32,68,176},30] (* Harvey P. Dale, Jan 26 2013 *)

Formula

a(n) = 4*A153873(n) = 2*A153819(n).
a(n) = 5 (mod 9) = A010716(n) (mod 9).
a(n) = 3*a(n-1) - a(n-2) + 4.
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
G.f.: 4*(8 - 15*x + 8x^2)/((1-x)*(1 -3*x +x^2)). - R. J. Mathar, Jan 23 2009

Extensions

Edited and extended by R. J. Mathar and N. J. A. Sloane, Jan 23 2009
Showing 1-3 of 3 results.