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-6 of 6 results.

A007502 Les Marvin sequence: a(n) = F(n) + (n-1)*F(n-1), F() = Fibonacci numbers.

Original entry on oeis.org

1, 2, 4, 9, 17, 33, 61, 112, 202, 361, 639, 1123, 1961, 3406, 5888, 10137, 17389, 29733, 50693, 86204, 146246, 247577, 418299, 705479, 1187857, 1997018, 3352636, 5621097, 9412937, 15744681, 26307469, 43912648
Offset: 1

Views

Author

Keywords

Comments

Denominators of convergents of the continued fraction with the n partial quotients: [1;1,1,...(n-1 1's)...,1,n], starting with [1], [1;2], [1;1,3], [1;1,1,4], ... Numerators are A088209(n-1). - Paul D. Hanna, Sep 23 2003

Examples

			a(7) = F(7) + 6*F(6) = 13 + 6*8 = 61.
		

References

  • Les Marvin, Problem, J. Rec. Math., Vol. 10 (No. 3, 1976-1977), p. 213.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000045, A045925, A088209 (numerators), A101220, A109754.

Programs

  • Haskell
    a007502 n = a007502_list !! (n-1)
    a007502_list = zipWith (+) a045925_list $ tail a000045_list
    -- Reinhard Zumkeller, Oct 01 2012, Mar 04 2012
    
  • Julia
    # The function 'fibrec' is defined in A354044.
    function A007502(n)
        n == 0 && return BigInt(1)
        a, b = fibrec(n-1)
        (n-1)*a + b
    end
    println([A007502(n) for n in 1:32]) # Peter Luschny, May 18 2022
    
  • Magma
    A007502:= func< n | Fibonacci(n) +(n-1)*Fibonacci(n-1) >;
    [A007502(n): n in [1..40]]; // G. C. Greubel, Aug 26 2025
    
  • Mathematica
    Table[Fibonacci[n]+(n-1)*Fibonacci[n-1], {n,40}] (* or *) LinearRecurrence[ {2,1,-2,-1}, {1,2,4,9}, 40](* Harvey P. Dale, Jul 13 2011 *)
    f[n_] := Denominator@  FromContinuedFraction@ Join[ Table[1, {n}], {n + 1}]; Array[f, 30, 0] (* Robert G. Wilson v, Mar 04 2012 *)
  • PARI
    Vec((1-x^2+x^3)/(1-x-x^2)^2+O(x^99)) \\ Charles R Greathouse IV, Mar 04 2012
    
  • SageMath
    def A007502(n): return fibonacci(n) +(n-1)*fibonacci(n-1)
    print([A007502(n) for n in range(1,41)]) # G. C. Greubel, Aug 26 2025

Formula

G.f.: (1-x^2+x^3)/(1-x-x^2)^2. - Paul D. Hanna, Sep 23 2003
a(n+1) = A109754(n, n+1) = A101220(n, 0, n+1). - N. J. A. Sloane, May 19 2006
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) for n>3, a(0)=1, a(1)=2, a(2)=4, a(3)=9. - Harvey P. Dale, Jul 13 2011
E.g.f.: exp(x/2)*( ((3 + 2*x)/sqrt(5))*sinh(sqrt(5)*x/2) - cosh(sqrt(5)*x/2) ) + 1. - G. C. Greubel, Aug 26 2025

A088209 Numerators of convergents of the continued fraction with the n+1 partial quotients: [1;1,1,...(n 1's)...,1,n+1], starting with [1], [1;2], [1;1,3], [1;1,1,4], ...

Original entry on oeis.org

1, 3, 7, 14, 28, 53, 99, 181, 327, 584, 1034, 1817, 3173, 5511, 9527, 16402, 28136, 48109, 82023, 139481, 236631, 400588, 676822, 1141489, 1921993, 3231243, 5424679, 9095126, 15230452, 25475429, 42566379, 71052157, 118489383
Offset: 0

Views

Author

Paul D. Hanna, Sep 23 2003

Keywords

Comments

Denominators form the Les Marvin sequence: A007502(n+1).

Examples

			a(3)/A007502(4) = [1;1,1,4] = 14/9.
		

Crossrefs

a(n) = A109754(n, n+2) = A101220(n, 0, n+2).
Cf. A007502 (the denominators), A000045, A045925.

Programs

  • Haskell
    a088209 n = a088209_list !! n
    a088209_list = zipWith (+) a000045_list $ tail a045925_list
    -- Reinhard Zumkeller, Oct 01 2012, Mar 04 2012
    
  • Julia
    # The function 'fibrec' is defined in A354044.
    function A088209(n)
        n == 0 && return BigInt(1)
        a, b = fibrec(n)
        a + (n + 1)*b
    end
    println([A088209(n) for n in 0:32]) # Peter Luschny, May 18 2022
  • Mathematica
    f[n_] := Numerator@  FromContinuedFraction@ Join[ Table[1, {n}], {n + 1}]; Array[f, 30, 0] (* Robert G. Wilson v, Mar 04 2012 *)
    CoefficientList[Series[(1+x-x^3)/(-1+x+x^2)^2,{x,0,40}],x] (* or *) LinearRecurrence[{2,1,-2,-1},{1,3,7,14},40] (* Harvey P. Dale, Jul 13 2021 *)

Formula

G.f.: (1+x-x^3)/(1-x-x^2)^2. [Corrected by Georg Fischer, Aug 16 2021]
a(n) = Fibonacci(n) + (n+1)*Fibonacci(n+1). - Paul Barry, Apr 20 2004
a(n) = a(n-1) + a(n-2) + Lucas(n). - Yuchun Ji, Apr 23 2023

A094588 a(n) = n*F(n-1) + F(n), where F = A000045.

Original entry on oeis.org

0, 1, 3, 5, 11, 20, 38, 69, 125, 223, 395, 694, 1212, 2105, 3639, 6265, 10747, 18376, 31330, 53277, 90385, 153011, 258523, 436010, 734136, 1234225, 2072043, 3474029, 5817515, 9730748, 16258910, 27139509, 45258917, 75408775, 125538539
Offset: 0

Views

Author

Paul Barry, May 13 2004

Keywords

Comments

This is the transform of the Fibonacci numbers under the inverse of the signed permutations matrix (see A094587).

Crossrefs

Programs

  • Haskell
    a094588 n = a094588_list !! n
    a094588_list = 0 : zipWith (+) (tail a000045_list)
                                   (zipWith (*) [1..] a000045_list)
    -- Reinhard Zumkeller, Mar 04 2012
    
  • Julia
    # The function 'fibrec' is defined in A354044.
    function A094588(n)
        n == 0 && return BigInt(0)
        a, b = fibrec(n - 1)
        a*n + b
    end
    println([A094588(n) for n in 0:34]) # Peter Luschny, May 16 2022
  • Magma
    [n*Fibonacci(n-1)+Fibonacci(n): n in [0..60]]; // Vincenzo Librandi, Apr 23 2011
    
  • Mathematica
    CoefficientList[Series[x (1+x-2x^2)/(1-x-x^2)^2,{x,0,40}],x]  (* Harvey P. Dale, Apr 16 2011 *)
  • PARI
    Vec((1+x-2*x^2)/(1-x-x^2)^2+O(x^99)) \\ Charles R Greathouse IV, Mar 04 2012
    

Formula

G.f. : x*(1 + x - 2*x^2)/(1 - x - x^2)^2.
a(n) = A101220(n, 0, n) - Ross La Haye, Jan 28 2005
a(n) = A109754(n, n). - Ross La Haye, Aug 20 2005
a(n) = (sin(c*n)*i - n*sin(c*(n - 1)))/(i^n*sqrt(5/4)) where c = arccos(i/2). - Peter Luschny, May 16 2022

A178521 The cost of all leaves in the Fibonacci tree of order n.

Original entry on oeis.org

0, 0, 3, 7, 17, 35, 70, 134, 251, 461, 835, 1495, 2652, 4668, 8163, 14195, 24565, 42331, 72674, 124354, 212155, 360985, 612743, 1037807, 1754232, 2959800, 4985475, 8384479, 14080601, 23614931, 39556030, 66181310, 110608187, 184670693, 308030923, 513334855
Offset: 0

Views

Author

Emeric Deutsch, Jun 14 2010

Keywords

Comments

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. In a Fibonacci tree the cost of a left (right) edge is defined to be 1 (2). The cost of a leaf of a Fibonacci tree is defined to be the sum of the costs of the edges that form the path from the root to this leaf.

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • Julia
    # The function 'fibrec' is defined in A354044.
    function A178521(n)
        n < 2 && return BigInt(0)
        a, b = fibrec(n - 1)
        a*n + (n - 1)*b
    end
    println([A178521(n) for n in 0:35]) # Peter Luschny, May 16 2022
  • Maple
    with(combinat); seq(n*fibonacci(n+1)-fibonacci(n), n = 0 .. 35);
  • Mathematica
    Table[n Fibonacci[n + 1] - Fibonacci[n], {n, 0, 40}]  (* Harvey P. Dale, Apr 21 2011 *)
    Table[(n - 1) Fibonacci[n] + n Fibonacci[n - 1], {n, 0, 40}] (* Bruno Berselli, Dec 06 2013 *)
  • PARI
    concat(vector(2), Vec(x^2*(x+3)/(x^2+x-1)^2 + O(x^50))) \\ Colin Barker, Jul 26 2017
    

Formula

a(n) = n*F(n+1) - F(n), where F(k) = A000045(k).
G.f.: x^2*(x+3)/(x^2+x-1)^2. - Colin Barker, Nov 11 2012
a(n) = Sum_{k=1..n-1} F(k) * L(n-k+1) where F(n) = A000045(n), L(n) = A000032(n). - Gary Detlefs, Dec 29 2012
a(n) = (n-1)*F(n) + n*F(n-1). - Bruno Berselli, Dec 06 2013
a(0) = 0, a(n) = A023607(n-1) + A099920(n-1). - Collin Berman, Dec 12 2016
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4). - Wesley Ivan Hurt, Dec 14 2016
a(n) = (n+1)*F(n+1) - F(n+2). - Bruno Berselli, Jul 26 2017
a(n) = (2^(-1-n)*(2*sqrt(5)*((1-sqrt(5))^n - (1+sqrt(5))^n) + (-(1-sqrt(5))^n*(-5+sqrt(5)) + (1+sqrt(5))^n*(5+sqrt(5)))*n))/5. - Colin Barker, Jul 26 2017
a(n) = (-n*sin(c*(-n - 1)) - sin(c*n)*i)/((-i)^(-n)*sqrt(5/4)) where c = arccos(i/2). - Peter Luschny, May 16 2022

A136391 a(n) = n*F(n) - (n-1)*F(n-1), where the F(j)'s are the Fibonacci numbers (F(0)=0, F(1)=1).

Original entry on oeis.org

1, 1, 4, 6, 13, 23, 43, 77, 138, 244, 429, 749, 1301, 2249, 3872, 6642, 11357, 19363, 32927, 55861, 94566, 159776, 269469, 453721, 762793, 1280593, 2147068, 3595422, 6013933, 10048559, 16773139, 27971549, 46605186, 77587084, 129063117, 214531397, 356346557
Offset: 1

Views

Author

Gary W. Adamson, Dec 28 2007

Keywords

Comments

By definition, the arithmetic mean of a(1) ... a(n) is equal to A000045(n).
Proof of the three-term recurrence formula: a(n+1) - a(n) - a(n-1) = ((n+1)*F(n+1) - n*F(n)) - (n*F(n) - (n-1)*F(n-1)) - ((n-1)*F(n-1) - (n-2)*F(n-2)) = (n+1)*F(n+1) - 2*n*F(n) + (n-2)*F(n-2) = (n+1)*(2*F(n) - F(n-2)) - 2*n*F(n) + (n-2)*F(n-2) = 2*F(n) - 3*F(n-2) = F(n-1) + F(n-3) = L(n-2). - Giuseppe Coppoletta, Sep 01 2014

Examples

			a(6) = 23 = 6*F(6) - 5*F(5) = 6*8 - 5*5 = 48 - 25.
		

Crossrefs

Programs

  • Julia
    # The function 'fibrec' is defined in A354044.
    function A136391(n)
        a, b = fibrec(n - 1)
        n*b - (n - 1)*a
    end
    println([A136391(n) for n in 1:35]) # Peter Luschny, May 18 2022
  • Maple
    with(combinat): seq(n*fibonacci(n)-(n-1)*fibonacci(n-1),n=1..30); # Emeric Deutsch, Jan 01 2008
  • Mathematica
    Table[n Fibonacci[n] - (n-1) Fibonacci[n-1], {n, 1, 20}] (* Vladimir Reshetnikov, Oct 28 2015 *)
  • PARI
    Vec(x*(1-x)*(1+x^2)/(1-x-x^2)^2 + O(x^100)) \\ Altug Alkan, Oct 28 2015
    

Formula

Equals A128064 * A000045.
From R. J. Mathar, Nov 25 2008: (Start)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) = A045925(n) - A045925(n-1).
G.f.: x*(1 - x)*(1 + x^2)/(1 - x - x^2)^2.
a(n) = A014286(n-1) - A014286(n-2), n>3. (End)
Recurrence: a(n+1) = a(n) + a(n-1) + L(n-2) for n>1, where L = A000032 (see proof in Comments section). - Giuseppe Coppoletta, Sep 01 2014
E.g.f.: (exp(x*phi)/phi+exp(-x/phi)*phi)*(x+1)/sqrt(5)-1, where phi=(1+sqrt(5))/2. - Vladimir Reshetnikov, Oct 28 2015
a(n) = F(n-1) + n*F(n-2). - Bruno Berselli, Jul 26 2017

Extensions

More terms from Emeric Deutsch, Jan 01 2008

A264147 a(n) = n*F(n+1) - (n+1)*F(n), where F = A000045.

Original entry on oeis.org

0, -1, 1, 1, 5, 10, 22, 43, 83, 155, 285, 516, 924, 1639, 2885, 5045, 8773, 15182, 26162, 44915, 76855, 131119, 223101, 378696, 641400, 1084175, 1829257, 3081193, 5181893, 8702290, 14594830, 24446971, 40902299, 68359619, 114132765, 190373580, 317258388, 528265207
Offset: 0

Views

Author

Bruno Berselli, Nov 04 2015

Keywords

Comments

a(n) is prime for n = 4, 7, 8, 26, 28, 52, 86, 87, 93, 97, 158, 196, 303, 2908, 3412, 4111, 4208, 6183, 6337, 9878, ...

Crossrefs

Cf. A178521: n*F(n+1) + (n+1)*F(n).
Cf. A094588: n*F(n-1) + F(n).
Cf. A099920: Sum_{i=0..n} F(i)*L(n-i).
Cf. A023607: Sum_{i=0..n} F(i)*L(n+1-i).

Programs

  • Julia
    # The function 'fibrec' is defined in A354044.
    function A264147(n)
        n == 0 && return BigInt(0)
        a, b = fibrec(n)
        n*b - a*(n + 1)
    end # Peter Luschny, May 16 2022
  • Magma
    [n*Fibonacci(n+1)-(n+1)*Fibonacci(n): n in [0..40]];
    
  • Maple
    A264147 := proc(n)
        n*combinat[fibonacci](n+1)-(n+1)*combinat[fibonacci](n) ;
    end proc:
    seq(A264147(n),n=0..10) ; # R. J. Mathar, Jun 02 2022
  • Mathematica
    Table[n Fibonacci[n + 1] - (n + 1) Fibonacci[n], {n, 0, 40}]
  • Maxima
    makelist(n*fib(n+1)-(n+1)*fib(n), n, 0, 40);
    
  • PARI
    for(n=0, 40, print1(n*fibonacci(n+1)-(n+1)*fibonacci(n)", "));
    
  • PARI
    concat(0, Vec(-x*(1 - 3*x) / (1 - x - x^2)^2 + O(x^50))) \\ Colin Barker, Jul 27 2017
    
  • Sage
    [n*fibonacci(n+1)-(n+1)*fibonacci(n) for n in (0..40)]
    

Formula

G.f.: x*(-1 + 3*x)/(1 - x - x^2)^2.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4).
a(n) = n*F(n-1) - F(n).
a(n) = Sum_{i=0..n} F(i)*L(n-1-i), where L() is a Lucas number (A000032).
a(n) = 3*A001629(n) - A001629(n+1).
a(n) = -(-1)^n*A178521(-n).
a(n+2) - a(n) = A007502(n+1).
Sum_{i>0} 1/a(i) = 1.39516607051636028893879220294180374...
a(n) = (-((1+sqrt(5))/2)^n*(2*sqrt(5) + (-5+sqrt(5))*n) + ((1-sqrt(5))/2)^n*(2*sqrt(5) + (5+sqrt(5))*n)) / 10. - Colin Barker, Jul 27 2017
a(n) = (-i)^n*(n*sin(c*(n+1)) - (n+1)*sin(c*n)*i)/sqrt(5/4) where c = arccos(i/2). - Peter Luschny, May 16 2022
Showing 1-6 of 6 results.