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.

A001595 a(n) = a(n-1) + a(n-2) + 1, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, 753, 1219, 1973, 3193, 5167, 8361, 13529, 21891, 35421, 57313, 92735, 150049, 242785, 392835, 635621, 1028457, 1664079, 2692537, 4356617, 7049155, 11405773, 18454929, 29860703, 48315633, 78176337
Offset: 0

Views

Author

Keywords

Comments

2-ranks of difference sets constructed from Segre hyperovals.
Sometimes called Leonardo numbers. - George Pollard, Jan 02 2008
a(n) is the number of nodes in the Fibonacci tree of order n. A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node (see the Knuth reference, p. 417). - Emeric Deutsch, Jun 14 2010
Also odd numbers whose index is a Fibonacci number: odd(Fib(k)). - Carmine Suriano, Oct 21 2010
This is the sequence A(1,1;1,1;1) of the family of sequences [a,b:c,d:k] considered by Gary Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 17 2010
In general, adding a constant to each successive term of a Horadam sequence with signature (c,d) will result in a third-order recurrence with signature (c+1, d-c,-d). - Gary Detlefs, Feb 01 2023

Examples

			a(7) = odd(F(7)) = odd(8) = 15. - _Carmine Suriano_, Oct 21 2010
		

References

  • E. W. Dijkstra, 'Fibonacci numbers and Leonardo numbers', circulated privately, July 1981.
  • E. W. Dijkstra, 'Smoothsort, an alternative for sorting in situ', Science of Computer Programming, 1(3): 223-233, 1982.
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. Ziegenbalg, Algorithmen, Spektrum Akademischer Verlag, 1996, p. 172.

Crossrefs

Programs

  • GAP
    List([0..40], n-> 2*Fibonacci(n+1) -1); # G. C. Greubel, Jul 10 2019
    
  • Haskell
    a001595 n = a001595_list !! n
    a001595_list =
       1 : 1 : (map (+ 1) $ zipWith (+) a001595_list $ tail a001595_list)
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    [2*Fibonacci(n+1)-1: n in [0..40]]; // G. C. Greubel, Jul 10 2019
    
  • Maple
    L := 1,3: for i from 3 to 40 do l := nops([ L ]): L := L,op(l,[ L ])+op(l-1,[ L ])+1: od: [ L ];
    A001595:=(1-z+z**2)/(z-1)/(z**2+z-1); # Simon Plouffe in his 1992 dissertation
    with(combinat): seq(fibonacci(n-1)+fibonacci(n+2)-1, n=0..40); # Zerinvary Lajos, Jan 31 2008
  • Mathematica
    Join[{1, 3}, Table[a[1]=1; a[2]=3; a[i]=a[i-1]+a[i-2]+1, {i, 3, 40} ] ]
    Table[2*Fibonacci[n+1]-1, {n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Oct 13 2009; modified by G. C. Greubel, Jul 10 2019 *)
    RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-1]+a[n-2]+1},a,{n,40}] (* or *) LinearRecurrence[{2,0,-1},{1,1,3},40] (* Harvey P. Dale, Aug 07 2012 *)
  • PARI
    a(n) = 2*fibonacci(n+1)-1 \\ Franklin T. Adams-Watters, Sep 30 2009
    
  • Python
    from sympy import fibonacci
    def A001595(n): return (fibonacci(n+1)<<1)-1 # Chai Wah Wu, Sep 10 2024
  • Sage
    [2*fibonacci(n+1)-1 for n in (0..40)] # G. C. Greubel, Jul 10 2019
    

Formula

a(n) = 2*Fibonacci(n+1) - 1 = A006355(n+2) - 1. - Richard L. Ollerton, Mar 22 2002
G.f.: (1-x+x^2)/(1-2x+x^3) = 2/(1-x-x^2) - 1/(1-x). [Conjectured by Simon Plouffe in his 1992 dissertation; this is readily verified.]
a(n) = (2/sqrt(5))*((1+sqrt(5))/2)^(n+1) - 2/sqrt(5)*((1-sqrt(5))/2)^(n+1) - 1.
a(n+1)/a(n) is asymptotic to Phi = (1+sqrt(5))/2. - Jonathan Vos Post, May 26 2005
For n >= 2, a(n+1) = ceiling(Phi*a(n)). - Franklin T. Adams-Watters, Sep 30 2009
a(n) = Sum_{k=0..n+1} A109754(n-k+1,k) - Sum_{k=0..n} A109754(n-k,k) = Sum_{k=0..n+1} A101220(n-k+1,0,k) - Sum_{k=0..n} A101220(n-k,0,k). - Ross La Haye, May 31 2006
a(n) = A000071(n+3) - A000045(n). - Vladimir Joseph Stephan Orlovsky, Oct 13 2009
a(n) = Fibonacci(n-1) + Fibonacci(n+2) - 1. - Zerinvary Lajos, Jan 31 2008, corrected by R. J. Mathar, Dec 17 2010
a(n) = 2*a(n-1) - a(n-3); a(0)=1, a(1)=1, a(2)=3. - Harvey P. Dale, Aug 07 2012
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x). - Stefano Spezia, Jan 23 2024

Extensions

Additional comments from Christian Krattenthaler (kratt(AT)ap.univie.ac.at)
Further edits from Franklin T. Adams-Watters, Sep 30 2009, and N. J. A. Sloane, Oct 03 2009

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

A128586 Triangle read by rows: A007318^(-1) * A128540.

Original entry on oeis.org

1, 0, 1, -1, 0, 2, 2, -3, -3, 3, -3, 8, 0, -7, 5, 4, -15, 10, 5, -17, 8, -5, 24, -30, 15, 27, -35, 13, 6, -35, 63, -70, -7, 77, -70, 21, -7, 48, -112, 182, -98, -84, 196, -134, 34, 8, -63, 180, -378, 378, -84, -336, 450, -251, 55, -9, 80, -270, 690, -966, 714, 210, -990, 980, -461, 89
Offset: 1

Views

Author

Gary W. Adamson, Mar 11 2007

Keywords

Comments

Row sums = A128587: (1, 1, 1, -1, 3, -5, 9, -15, 25, -41, ...).

Examples

			First few rows of the triangle:
   1;
   0,   1;
  -1,   0,   2;
   2,  -3,  -3,   3;
  -3,   8,   0,  -7,   5;
   4, -15,  10,   5, -17,   8;
  ...
		

Crossrefs

Formula

Inverse binomial transform of A128540.
Matrix product A130595 * A128540. - Georg Fischer, Jun 01 2023

Extensions

a(33) corrected, a(42)=-84 inserted and more terms from Georg Fischer, Jun 01 2023
Showing 1-3 of 3 results.