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.

A354044 a(n) = 2*(-i)^n*(n*sin(c*(n+1)) - i*sin(-c*n))/sqrt(5) where c = arccos(i/2).

Original entry on oeis.org

0, 2, 5, 11, 23, 45, 86, 160, 293, 529, 945, 1673, 2940, 5134, 8917, 15415, 26539, 45525, 77842, 132716, 225685, 382877, 648165, 1095121, 1846968, 3109850, 5228261, 8777315, 14716223, 24643389, 41220110, 68873848, 114964805, 191719849, 319436697, 531789785
Offset: 0

Views

Author

Peter Luschny, May 16 2022

Keywords

Crossrefs

Cf. A000045 (the Fibonacci numbers), A007502, A088209, A094588, A136391, A178521, A264147, A353595.

Programs

  • Julia
    function fibrec(n::Int)
        n == 0 && return (BigInt(0), BigInt(1))
        a, b = fibrec(div(n, 2))
        c = a * (b * 2 - a)
        d = a * a + b * b
        iseven(n) ? (c, d) : (d, c + d)
    end
    function A354044(n)
        n == 0 && return BigInt(0)
        a, b = fibrec(n + 1)
        a*(n - 1) + b
    end
    println([A354044(n) for n in 0:35])
    
  • Maple
    c := arccos(I/2): a := n -> 2*(-I)^n*(n*sin(c*(n+1)) - I*sin(-c*n))/sqrt(5):
    seq(simplify(a(n)), n = 0..35);
  • PARI
    a(n) = fibonacci(n) + n*fibonacci(n+1) \\ Jianing Song, May 16 2022

Formula

a(n) = [x^n] ((2 - x)*x*(x + 1))/(x^2 + x - 1)^2.
a(n) = (((-1 - sqrt(5))^(-n)*(sqrt(5)*n - n - 2) + (-1 + sqrt(5))^(-n)*(sqrt(5)*n + n + 2)))/(2^(1 - n)*sqrt(5)).
a(n) = (-1)^(n - 1)*(Fibonacci(-n) - n*Fibonacci(-n - 1)).
a(n) = (-1)^(n - 1)*A353595(-n, -n). (A353595 is defined for all n in Z.)
a(n) = ((-42*n^2 + 259*n - 350)*a(n - 3) + (123*n^2 - 76*n - 446)*a(n - 2) + (207*n^2 - 885*n + 412)*a(n - 1)) / ((165*n - 542)*(n - 1)) for n >= 4.
a(n) = Fibonacci(n) + n*Fibonacci(n+1). - Jianing Song, May 16 2022

A178525 The sum of the costs of all nodes in the Fibonacci tree of order n.

Original entry on oeis.org

0, 0, 3, 8, 22, 49, 104, 208, 403, 760, 1406, 2561, 4608, 8208, 14499, 25432, 44342, 76913, 132808, 228416, 391475, 668840, 1139518, 1936513, 3283392, 5555424, 9381699, 15815528, 26618518, 44733745, 75073256, 125827696, 210642643
Offset: 0

Views

Author

Emeric Deutsch, Jun 15 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 node in a Fibonacci tree is defined to be the sum of the costs of the edges that form the path from the root to this node.
A178525 is the 1-sequence of reduction of the odd number sequence (2n-1) by x^2 -> x+1; as such it is related to 0-sequence of this reduction, A192304. See A192232 for definition of "k-sequence of reduction of [sequence] by [substitution]". - Clark Kimberling, Jun 27 2011

References

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

Crossrefs

Programs

  • GAP
    List([0..40], n -> 3 +(2*n-3)*Fibonacci(n-1) +(2*n-5)*Fibonacci(n)); # G. C. Greubel, Jan 30 2019
  • Magma
    [3 +(2*n-3)*Fibonacci(n-1) +(2*n-5)*Fibonacci(n): n in [0..40]]; // G. C. Greubel, Jan 30 2019
    
  • Maple
    with(combinat): seq(3+(2*n-3)*fibonacci(n-1)+(2*n-5)*fibonacci(n), n = 0 .. 32);
  • Mathematica
    Table[3 +(2*n-3)*Fibonacci[n-1] +(2*n-5)*Fibonacci[n], {n,0,40}] (* G. C. Greubel, Jan 30 2019 *)
  • PARI
    a(n) = 3+(2*n-3)*fibonacci(n-1) + (2*n-5)*fibonacci(n); \\ Michel Marcus, Jan 21 2019
    
  • Sage
    [3 +(2*n-3)*fibonacci(n-1) +(2*n-5)*fibonacci(n) for n in range(40)] # G. C. Greubel, Jan 30 2019
    

Formula

a(n) = 3 + (2*n-3)*F(n-1) + (2*n-5)*F(n), where F(k)=A000045(k) are the Fibonacci numbers.
a(n) = a(n-1) + a(n-2) + 2*F(n+1) + 2*F(n-1) - 3 (n>=2), F(0)=0, F(1)=0.
G.f.: z^2*(3-z+z^2)/((1-z)*(1-z-z^2)^2).

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