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-10 of 12 results. Next

A001629 Self-convolution of Fibonacci numbers.

Original entry on oeis.org

0, 0, 1, 2, 5, 10, 20, 38, 71, 130, 235, 420, 744, 1308, 2285, 3970, 6865, 11822, 20284, 34690, 59155, 100610, 170711, 289032, 488400, 823800, 1387225, 2332418, 3916061, 6566290, 10996580, 18394910, 30737759, 51310978, 85573315, 142587180, 237387960, 394905492
Offset: 0

Views

Author

Keywords

Comments

Number of elements in all subsets of {1,2,...,n-1} with no consecutive integers. Example: a(5)=10 because the subsets of {1,2,3,4} that have no consecutive elements, i.e., {}, {1}, {2}, {3}, {4}, {1,3}, {1,4}, {2,4}, the total number of elements is 10. - Emeric Deutsch, Dec 10 2003
If g is either of the real solutions to x^2-x-1=0, g'=1-g is the other one and phi is any 2 X 2-matricial solution to the same equation, not of the form gI or g'I, then Sum'_{i+j=n-1} g^i phi^j = F_n + (A001629(n) - A001629(n-1)g')*(phi-g'I), where i,j >= 0, F_n is the n-th Fibonacci number and I is the 2 X 2 identity matrix... - Michele Dondi (blazar(AT)lcm.mi.infn.it), Apr 06 2004
Number of 3412-avoiding involutions containing exactly one subsequence of type 321.
Number of binary sequences of length n with exactly one pair of consecutive 1's. - George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Sep 02 2004
For this sequence the n-th term is given by (nF(n+1)-F(n)+nF(n-1))/5 where F(n) is the n-th Fibonacci number. - Mrs. J. P. Shiwalkar and M. N. Deshpande (dpratap_ngp(AT)sancharnet.in), Apr 20 2005
If an unbiased coin is tossed n times then there are 2^n possible strings of H and T. Out of these, number of strings with exactly one 'HH' is given by a(n) where a(n) denotes n-th term of this sequence. - Mrs. J. P. Shiwalkar and M. N. Deshpande (dpratap_ngp(AT)sancharnet.in), May 04 2005
a(n) is half the number of horizontal dominoes in all domino tilings of a horizontally aligned 2 X n rectangle; a(n+1) = the number of vertical dominoes in all domino tilings of a horizontally aligned 2 X n rectangle; thus 2*a(n)+a(n+1)=n*F(n+1) = the number of dominoes in all domino tilings of a 2 X n rectangle, where F=A000045, the Fibonacci sequence. - Roberto Tauraso, May 02 2005; Graeme McRae, Jun 02 2006
a(n+1) = (-i)^(n-1)*(d/dx)S(n,x)|A049310%20for%20the%20S-polynomials.%20-%20_Wolfdieter%20Lang">{x=i}, where i is the imaginary unit, n >= 1. First derivative of Chebyshev S-polynomials evaluated at x=i multiplied by (-i)^(n-1). See A049310 for the S-polynomials. - _Wolfdieter Lang, Apr 04 2007
For n >= 4, a(n) is the number of weak compositions of n-2 in which exactly one part is 0 and all other parts are either 1 or 2. - Milan Janjic, Jun 28 2010
For n greater than 1, a(n) equals the absolute value of (1 - (1/2 - i/2)*(1 + (-1)^(n + 1))) times the x-coefficient of the characteristic polynomial of the (n-1) X (n-1) tridiagonal matrix with i's along the main diagonal (i is the imaginary unit), 1's along the superdiagonal and the subdiagonal and 0's everywhere else (see Mathematica code below). - John M. Campbell, Jun 23 2011
For n > 0: a(n) = Sum_{k=1..n-1} (A039913(n-1,k)) / 2. - Reinhard Zumkeller, Oct 07 2012
The right-hand side of a binomial-coefficient identity [Gauthier]. - N. J. A. Sloane, Apr 09 2013
a(n) is the number of edges in the Fibonacci cube Gamma(n-1) (see the Klavzar 2005 reference, p. 149). Example: a(3)=2; indeed, the Fibonacci cube Gamma(2) is the path P(3) having 2 edges. - Emeric Deutsch, Aug 10 2014
a(n) is the number of c(i)'s, including repetitions, in p(n), where p(n)/q(n) is the n-th convergent p(n)/q(n) of the formal infinite continued fraction [c(0), c(1), ...]; e.g., the number of c(i)'s in p(3) = c(0)*c(1)*c(2)*c(3) + c(0)*c(1) + c(0)*c(3) + c(2)*c(3) + 1 is a(5) = 10. - Clark Kimberling, Dec 23 2015
Also the number of maximal and maximum cliques in the (n-1)-Fibonacci cube graph. - Eric W. Weisstein, Sep 07 2017
a(n+1) is the total number of fixed points in all permutations p on 1, 2, ..., n such that |k-p(k)| <= 1 for 1 <= k <= n. - Katharine Ahrens, Sep 03 2019
From Steven Finch, Mar 22 2020: (Start)
a(n+1) is the total binary weight (cf. A000120) of all A000045(n+2) binary sequences of length n not containing any adjacent 1's.
The only three 2-bitstrings without adjacent 1's are 00, 01 and 10. The bitsums of these are 0, 1 and 1. Adding these give a(3)=2.
The only five 3-bitstrings without adjacent 1's are 000, 001, 010, 100 and 101. The bitsums of these are 0, 1, 1, 1 and 2. Adding these give a(4)=5.
The only eight 4-bitstrings without adjacent 1's are 0000, 0001, 0010, 0100, 1000, 0101, 1010 and 1001. The bitsums of these are 0, 1, 1, 1, 1, 2, 2, and 2. Adding these give a(5)=10. (End)
Number of tilings of a 1 X n strip with monominoes (1 X 1 squares) and at least one domino (1 X 2 rectangles), where exactly one of the dominoes is colored gold. - Greg Dresden and Jiachen Weng, Jul 31 2025

Examples

			G.f. = x^2 + 2*x^3 + 5*x^4 + 10*x^5 + 20*x^6 + 38*x^7 + 71*x^8 + 130*x^9 + ... - _Michael Somos_, Jun 24 2018
		

References

  • Donald E. Knuth, Fundamental Algorithms, Addison-Wesley, 1968, p. 83, Eq. 1.2.8--(17). - Don Knuth, Feb 26 2019
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, 2001, Chapter 15, page 187, "Hosoya's Triangle", and p. 375, eq. (32.13).
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 101.
  • 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).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989, p. 183, Nr.(98).

Crossrefs

Row sums of triangles A058071, A134510, A134836.
First differences of A006478.

Programs

  • GAP
    List([0..40],n->Sum([0..n],k->Fibonacci(k)*Fibonacci(n-k))); # Muniru A Asiru, Jun 24 2018
    
  • Haskell
    a001629 n = a001629_list !! (n-1)
    a001629_list = f [] $ tail a000045_list where
       f us (v:vs) = (sum $ zipWith (*) us a000045_list) : f (v:us) vs
    -- Reinhard Zumkeller, Jan 18 2014, Oct 16 2011
    
  • Magma
    I:=[0,0,1,2]; [n le 4 select I[n] else 2*Self(n-1)+Self(n-2)-2*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    a:= n-> (<<2|1|0|0>, <1|0|1|0>, <-2|0|0|1>, <-1|0|0|0>>^n)[1,3]:
    seq(a(n), n=0..40); # Alois P. Heinz, Aug 01 2008
    # Alternative:
    A001629 := n -> `if`(n<2, 0, (n-1)*hypergeom([1-n/2, (3-n)/2], [1-n], -4)):
    seq(simplify(A001629(n)), n=0..37); # Peter Luschny, Apr 10 2018
  • Mathematica
    Table[Sum[Binomial[n-i, i] i, {i, 0, n}], {n, 0, 34}] (* Geoffrey Critzer, May 04 2009 *)
    Table[Abs[(1 -(1/2 -I/2)(1 - (-1)^n))*Coefficient[CharacteristicPolynomial[ Array[KroneckerDelta[#1, #2] I + KroneckerDelta[#1 + 1, #2] + KroneckerDelta[#1 -1, #2] &, {n-1, n-1}], x], x]], {n,2,50}] (* John M. Campbell, Jun 23 2011 *)
    LinearRecurrence[{2,1,-2,-1}, {0,0,1,2}, 40] (* Harvey P. Dale, Aug 26 2013 *)
    CoefficientList[Series[x^2/(1-x-x^2)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Nov 19 2014 *)
    Table[(2nFibonacci[n-1] + (n-1)Fibonacci[n])/5, {n, 0, 40}] (* Vladimir Reshetnikov, May 08 2016 *)
    Table[With[{fibs=Fibonacci[Range[n]]},ListConvolve[fibs,fibs]],{n,-1,40}]//Flatten (* Harvey P. Dale, Aug 19 2018 *)
  • PARI
    Vec(1/(1-x-x^2)^2+O(x^99)) \\ Charles R Greathouse IV, Feb 03 2014
    
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,-2,1,2]^n)[2,4] \\ Charles R Greathouse IV, Jul 20 2016
    
  • SageMath
    def A001629(n): return (1/5)*(n*lucas_number2(n, 1, -1) - fibonacci(n))
    [A001629(n) for n in (0..40)] # G. C. Greubel, Apr 06 2022

Formula

G.f.: x^2/(1 - x - x^2)^2. - Simon Plouffe in his 1992 dissertation
a(n) = A037027(n-1, 1), n >= 1 (Fibonacci convolution triangle).
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4), n > 3.
a(n) = Sum_{k=0..n} A000045(k)*A000045(n-k).
a(n+1) = Sum_{i=0..F(n)} A007895(i), where F = A000045, the Fibonacci sequence. - Claude Lenormand (claude.lenormand(AT)free.fr), Feb 04 2001
a(n) = Sum_{k=0..floor(n/2)-1} (k+1)*binomial(n-k-1, k+1). - Emeric Deutsch, Nov 15 2001
a(n) = floor( (1/5)*(n - 1/sqrt(5))*phi^n + 1/2 ) where phi=(1+sqrt(5))/2 is the golden ratio. - Benoit Cloitre, Jan 05 2003
a(n) = a(n-1) + A010049(n-1) for n > 0. - Emeric Deutsch, Dec 10 2003
a(n) = Sum_{k=0..floor((n-2)/2)} (n-k-1)*binomial(n-k-2, k). - Paul Barry, Jan 25 2005
a(n) = ((n-1)*F(n) + 2*n*F(n-1))/5, F(n)=A000045(n) (see Vajda and Koshy reference).
F'(n, 1), the first derivative of the n-th Fibonacci polynomial evaluated at 1. - T. D. Noe, Jan 18 2006
a(n) = a(n-1) + a(n-2) + F(n-1), where F=A000045, the Fibonacci sequence. - Graeme McRae, Jun 02 2006
a(n) = (1/5)*(n-1/sqrt(5))*((1+sqrt(5))/2)^n + (1/5)*(n+1/sqrt(5))*((1-sqrt(5))/2)^n. - Graeme McRae, Jun 02 2006
a(n) = A055244(n-1) - F(n-2). Example: a(6) = 20 = A055244(5) - F(3) = (23 - 3). - Gary W. Adamson, Jul 27 2007
a(n) = term (1,3) in the 4 X 4 matrix [2,1,0,0; 1,0,1,0; -2,0,0,1; -1,0,0,0]^n. - Alois P. Heinz, Aug 01 2008
a(n) = A214178(n,1) for n > 0. - Reinhard Zumkeller, Jul 08 2012
a(n) = ((n+1)*F(n-1) + (n-1)*F(n+1))/5. - Richard R. Forberg, Aug 04 2014
(n-2)*a(n) - (n-1)*a(n-1) - n*a(n-2) = 0, n > 1. - Michael D. Weiner, Nov 18 2014
a(n) = Sum_{i=0..n-1} Sum_{j=0..i} F(j-1)*F(i-j), where F(n) = A000045 Fibonacci Numbers. - Carlos A. Rico A., Jul 14 2016
a(n) = (n*Lucas(n) - Fibonacci(n))/5, where Lucas = A000032, Fibonacci = A000045. - Vladimir Reshetnikov, Sep 27 2016
a(n) = (n-1)*hypergeom([1-n/2, (3-n)/2], [1-n], -4) for n >= 2. - Peter Luschny, Apr 10 2018
a(n) = -(-1)^n a(-n) for all n in Z. - Michael Somos, Jun 24 2018
E.g.f.: (1/50)*exp(-2*x/(1+sqrt(5)))*(2*sqrt(5)-5*(-1+sqrt(5))*x+exp(sqrt(5)*x)*(-2*sqrt(5)+5*(1+sqrt(5))*x)). - Stefano Spezia, Sep 03 2019
From Peter Bala, Jan 14 2025: (Start)
a(2*n+1) is even and a(2*n) has the same parity as Fibonacci(n).
For n >= 1, a(n) = (2/n)*Sum_{k = 0..n} k*Fibonacci(k)*Fibonacci(n-k). (End)

A002940 Arrays of dumbbells.

Original entry on oeis.org

1, 4, 11, 26, 56, 114, 223, 424, 789, 1444, 2608, 4660, 8253, 14508, 25343, 44030, 76136, 131110, 224955, 384720, 656041, 1115784, 1893216, 3205416, 5416441, 9136084, 15384563, 25866914, 43429784, 72821274, 121953943, 204002680, 340886973, 569047468, 949022608
Offset: 1

Views

Author

Keywords

Comments

Whitney transform of n. The Whitney transform maps the sequence with g.f. g(x) to that with g.f. (1/(1-x))g(x(1+x)). - Paul Barry, Feb 16 2005
a(n-1) is the permanent of the n X n 0-1 matrix with 1 in (i,j) position iff (i=1 and j1). For example, with n=5, a(4) = per([[1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1]]) = 26. - David Callan, Jun 07 2006
a(n) is the internal path length of the Fibonacci tree of order n+2. 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. The internal path length of a tree is the sum of the levels of all of its internal (i.e. non-leaf) nodes. - Emeric Deutsch, Jun 15 2010
Partial Sums of A023610 - John Molokach, Jul 03 2013

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983,(2.3.14).
  • 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).
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • Haskell
    a002940 n = a002940_list !! (n-1)
    a002940_list = 1 : 4 : 11 : zipWith (+)
       (zipWith (-) (map (* 2) $ drop 2 a002940_list) a002940_list)
       (drop 5 a000045_list)
    -- Reinhard Zumkeller, Jan 18 2014
    
  • Magma
    m:=35; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1+x)/((1-x)*(1-x-x^2)^2) )); // G. C. Greubel, Jan 31 2019
    
  • Mathematica
    a[n_]:= a[n]= If[n<3, n^2, 2a[n-1] -a[n-3] +Fibonacci[n+1]]; Array[a, 32] (* Jean-François Alcover, Jul 31 2018 *)
  • PARI
    my(x='x+O('x^35)); Vec((1+x)/((1-x)*(1-x-x^2)^2)) \\ G. C. Greubel, Jan 31 2019
    
  • Sage
    ((1+x)/((1-x)*(1-x-x^2)^2)).series(x, 35).coefficients(x, sparse=False) # G. C. Greubel, Jan 31 2019

Formula

a(n) = 2*a(n-1) - a(n-3) + A000045(n+1).
G.f.: x*(1+x)/((1-x)*(1-x-x^2)^2).
a(n) = Sum_{k=0..n} ( Sum_{i=0..n} k*C(k, i-k) ). - Paul Barry, Feb 16 2005
E.g.f.: 2*exp(x) + exp(x/2)*((55*x - 50)*cosh(sqrt(5)*x/2) + sqrt(5)*(25*x - 22)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Dec 03 2023

Extensions

More terms from Henry Bottomley, Jun 02 2000

A178523 The path length of the Fibonacci tree of order n.

Original entry on oeis.org

0, 0, 2, 6, 16, 36, 76, 152, 294, 554, 1024, 1864, 3352, 5968, 10538, 18478, 32208, 55852, 96420, 165800, 284110, 485330, 826752, 1404816, 2381616, 4029216, 6803666, 11468502, 19300624, 32433204, 54426364, 91216184, 152691702, 255313658, 426460288, 711634648
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. The path length of a tree is the sum of the levels of all of its nodes.
This is also the number of configurations of n indistinguishable pairs placed on the vertices of the ladder graph P_2 X P_n such that all but one such pair are joined by an edge; equivalently the number of "(n-1)-domino" configurations in the game of memory played on a 2 X n rectangular array, see [Young]. - Donovan Young, Oct 23 2018

Examples

			a(2)=2 because the Fibonacci tree of order 2 is /\ with path length 1 + 1. - _Emeric Deutsch_, Sep 13 2010
		

References

  • Ralph P. Grimaldi, Properties of Fibonacci trees, In Proceedings of the Twenty-second Southeastern Conference on Combinatorics, Graph Theory, and Computing (Baton Rouge, LA, 1991); Congressus Numerantium 84 (1991), 21-32. - Emeric Deutsch, Sep 13 2010
  • D. E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Programs

  • GAP
    a:=[0,2];;  for n in [3..35] do a[n]:=a[n-1]+a[n-2]+ 2*Fibonacci(n +1) -2; od; Concatenation([0],a); # Muniru A Asiru, Oct 23 2018
    
  • Magma
    [2+(2/5)*(4*n-9)*Fibonacci(n)+(2/5)*(3*n-5)*Fibonacci(n-1): n in [0..40]]; // Vincenzo Librandi, Oct 24 2018
    
  • Maple
    with(combinat): a := proc (n) options operator, arrow: 2+((8/5)*n-18/5)*fibonacci(n)+((6/5)*n-2)*fibonacci(n-1) end proc: seq(a(n), n = 0 .. 35);
    G := 2*z^2/((1-z)*(1-z-z^2)^2): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 35);
  • Mathematica
    Table[2 +2/5 (4n-9) Fibonacci[n] +2/5 (3n -5) Fibonacci[n-1], {n, 0, 40}] (* or *) LinearRecurrence[{3, -1, -3, 1, 1}, {0, 0, 2, 6, 16}, 40] (* Harvey P. Dale, Oct 02 2016 *)
  • PARI
    vector(40, n, n--; (10+(8*n-18)*fibonacci(n)+(6*n-10)*fibonacci(n-1))/5) \\ G. C. Greubel, Jan 31 2019
    
  • Sage
    [(10+(8*n-18)*fibonacci(n)+(6*n-10)*fibonacci(n-1))/5 for n in range(40)] # G. C. Greubel, Jan 31 2019

Formula

a(n) = 2 + (2/5)*(4n-9)*F(n) + (2/5)*(3n-5)*F(n-1), where F(n) = A000045(n) (Fibonacci numbers).
a(n) = 2*A006478(n+1).
a(n) = Sum_{k=0..n-1} k*A178522(n,k).
G.f.: 2*z^2/((1-z)*(1-z-z^2)^2).
From Emeric Deutsch, Sep 13 2010: (Start)
a(0)=a(1)=0, a(n) = a(n-1)+a(n-2)+2F(n+1)-2 if n>=2; here F(j)=A000045(j) are the Fibonacci numbers (see the Grimaldi reference, Eq. (**) on p. 23).
An explicit formula for a(n) is given in the Grimaldi reference (Theorem 2).
(End)
E.g.f.: 2*exp(x) + 2*exp(x/2)*(5*(4*x - 5)*cosh(sqrt(5)*x/2) + sqrt(5)*(10*x - 13)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Dec 04 2023

A122491 a(n) = n * Fibonacci(n) - Sum_{i=0..n} Fibonacci(i).

Original entry on oeis.org

0, 0, 0, 2, 5, 13, 28, 58, 114, 218, 407, 747, 1352, 2420, 4292, 7554, 13209, 22969, 39748, 68494, 117590, 201210, 343275, 584087, 991440, 1679208, 2838408, 4789058, 8066669, 13566373, 22782892, 38209762, 64003002, 107083610, 178967807, 298803459, 498404504
Offset: 0

Views

Author

Ben Paul Thurston, Sep 16 2006

Keywords

Comments

Similar to A190062.
Also the circuit rank and corank of the n-Lucas cube graph. - Eric W. Weisstein, Jul 28 2023

Examples

			a(5) = 13 because Fib(5) = 5, times 5 = 25 and subtract sum(Fib(5)) = 12 to get 13.
		

Crossrefs

Cf. A000045.

Programs

  • Maple
    with(combinat, fibonacci): for i from 1 to 30 do i*fibonacci(i) - sum(fibonacci(k), k=0..i); end do;
  • Mathematica
    Table[n Fibonacci[n] - Fibonacci[n + 2] + 1, {n, 0, 40}] (* Stefan Steinerberger, Feb 22 2008 *)
    LinearRecurrence[{3, -1, -3, 1, 1}, {0, 0, 0, 2, 5}, 40] (* Harvey P. Dale, May 17 2016 *)
  • PARI
    a(n)=n*fibonacci(n) - fibonacci(n+2) + 1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = n * Fibonacci(n) - Fibonacci(n+2) + 1. - Stefan Steinerberger, Feb 22 2008
G.f.: x^3*(2-x)/((1-x)*(1-x-x^2)^2). - Colin Barker, Feb 10 2012
a(n+2) = Sum_{k=0..n} A099920(k). - J. M. Bergot, Apr 13 2013
a(n) = 2*A006478(n)-A006478(n-1). - R. J. Mathar, May 04 2014

Extensions

Edited by N. J. A. Sloane, Sep 17 2006

A175722 a(n) = -a(n-1) + a(n-2) - F(-n) + 1, a(0) = 1, a(1) = -1, where F() = Fibonacci numbers A000045.

Original entry on oeis.org

1, -1, 4, -6, 14, -24, 47, -83, 152, -268, 476, -832, 1453, -2517, 4348, -7474, 12810, -21880, 37275, -63335, 107376, -181656, 306744, -517056, 870169, -1462249, 2453812, -4112478, 6884102, -11510808, 19226951, -32084027, 53489288, -89097892, 148290068
Offset: 0

Views

Author

Roger L. Bagula, Dec 04 2010

Keywords

Examples

			G.f. = 1 - x + 4*x^2 - 6*x^3 + 14*x^4 - 24*x^5 + 47*x^6 - 83*x^7 + 152*x^8 + ...
		

Crossrefs

Cf. m=1: A077899, m large: A077925.

Programs

  • GAP
    List([0..40], n-> 1 + (-1)^n*(n*Lucas(1,-1,n+1)[2] + 7*Fibonacci(n))/5 ); # G. C. Greubel, Dec 04 2019
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-x)*(1+x-x^2)^2))); // G. C. Greubel, Aug 14 2018
    
  • Maple
    with(combinat); seq( 1 + (-1)^n*(n*fibonacci(n+2) + (n+7)*fibonacci(n))/5, n=0..40); # G. C. Greubel, Dec 04 2019
  • Mathematica
    f[x_, m_] = ExpandAll[(x -x^(m+1))*(1-x-x^2) -(1 -2*x +x^(m+1))];
    g[x_, n_] = ExpandAll[x^(m + 3)*f[1/x, m]];
    a = Table[Table[SeriesCoefficient[Series[1/g[x, m], {x, 0, 20}], n], {n, 0, 20}], {m, 1, 20}]
    CoefficientList[Series[1/((1-x)(1+x-x^2)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 13 2014 *)
    RecurrenceTable[{a[0]==1,a[1]==-1,a[n]==-a[n-1]+a[n-2]-Fibonacci[-n]+1},a,{n,40}] (* Harvey P. Dale, May 12 2018 *)
    Table[1 + (-1)^n*(n*LucasL[n+1] + 7*Fibonacci[n])/5, {n,0,40}] (* G. C. Greubel, Dec 04 2019 *)
  • PARI
    {a(n) = if( n<0, polcoeff( x^5 / ((1 - x) * (1 - x - x^2)^2) + x * O(x^-n), -n), polcoeff( 1 / ((1 - x) * (1 + x - x^2)^2) + x * O(x^n), n))}; /* Michael Somos, Mar 11 2014 */
    
  • PARI
    vector(41, n, my(f=fibonacci); 1 -(-1)^n*((n-1)*f(n+1) +(n+6)*f(n-1))/5 ) \\ G. C. Greubel, Dec 04 2019
    
  • Sage
    [1 + (-1)^n*(n*lucas_number2(n+1, 1,-1) + 7*fibonacci(n))/5 for n in (0..40)] # G. C. Greubel, Dec 04 2019
    

Formula

G.f.: 1/(- x^m + 1 - x^(1 + m) + x + 3*x^(2 + m) - 2*x^2 - x^(3 + m)) for m=2.
G.f.: 1 / ((1 - x) * (1 + x - x^2)^2). - Michael Somos, Mar 11 2014
a(n) = A006478(-2-n) for all n in Z. - Michael Somos, Mar 11 2014
a(n) = 1 + (-1)^n*(n*Lucas(n+1) + 7*Fibonacci(n))/5. - G. C. Greubel, Dec 04 2019
E.g.f.: exp(-x/2)*(25*exp(3*x/2) - 15*x*cosh(sqrt(5)*x/2) + sqrt(5)*(5*x - 14)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Jul 24 2022

A289207 a(n) = max(0, n-2).

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Keywords

Comments

This simple sequence is such that there is one and only one array of differences D(n,k) where the first and the second upper subdiagonal is a(n).
The rows of this array are existing sequences of the OEIS, prepended with zeros:
row 0 is A118425,
row 1 is A006478,
row 2 is A001629,
row 3 is A010049,
row 4 is A006367,
row 5 is not in the OEIS.
It can be observed that a(n) is an autosequence of the first kind whose second kind mate is A199969. In addition, the structure of the array D(n,k) shows that the first row is an autosequence.
For n = 1 to 8, rows with only one leading zero are also autosequences.

Examples

			Array of differences begin:
   0,   0,   0,   0,  0,   0,  0,  1,  4, 12, 30, 68, ...
   0,   0,   0,   0,  0,   0,  1,  3,  8, 18, 38, 76, ...
   0,   0,   0,   0,  0,   1,  2,  5, 10, 20, 38, 71, ...
   0,   0,   0,   0,  1,   1,  3,  5, 10, 18, 33, 59, ...
   0,   0,   0,   1,  0,   2,  2,  5,  8, 15, 26, 46, ...
   0,   0,   1,  -1,  2,   0,  3,  3,  7, 11, 20, 34, ...
   0,   1,  -2,   3, -2,   3,  0,  4,  4,  9, 14, 24, ...
   1,  -3,   5,  -5,  5,  -3,  4,  0,  5,  5, 10, 16, ...
  -4,   8, -10,  10, -8,   7, -4,  5,  0,  6,  6, 17, ...
  12, -18,  20, -18, 15, -11,  9, -5,  6,  0,  7,  7, ...
  ...
		

Crossrefs

Essentially the same as A023444. Cf. A001477, A118425, A006478, A001629, A010049, A006367, A199969.

Programs

  • Mathematica
    a[n_] := Max[0, n - 2];
    D[n_, k_] /; k == n + 1 := a[n]; D[n_, k_] /; k == n + 2 := a[n]; D[n_, k_] /; k > n + 2 := D[n, k] = Sum[D[n + 1, j], {j, 0, k - 1}]; D[n_, k_] /; k <= n := D[n, k] = D[n - 1, k + 1] - D[n - 1, k];
    Table[D[n, k], {n, 0, 11}, {k, 0, 11}]

Formula

G.f.: x^3 / (1-x)^2.

A006479 From variance of Fibonacci search.

Original entry on oeis.org

0, 0, 0, 1, 5, 18, 52, 134, 318, 713, 1531, 3180, 6432, 12732, 24756, 47417, 89665, 167694, 310628, 570562, 1040226, 1883953, 3391799, 6073848, 10824096, 19204536, 33936456
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006478.

Programs

  • Maple
    A006479:=z**3*(1+z+z**2)/(z-1)/(z**2+z-1)**3; # conjectured by Simon Plouffe in his 1992 dissertation

Formula

(Conjecture equivalent to Plouffe g.f.): a(n) = -3 - 2*A001629(n+2) - 3*A001629(n+1) + 2*A001628(n-1) + A020701(n+1). - R. J. Mathar, Dec 06 2010

A091186 Triangle read by rows, in which n-th row gives expansion of x^n/((1-x)(1-x-x^2)^n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 7, 8, 4, 1, 1, 12, 18, 13, 5, 1, 1, 20, 38, 35, 19, 6, 1, 1, 33, 76, 86, 59, 26, 7, 1, 1, 54, 147, 197, 164, 91, 34, 8, 1, 1, 88, 277, 430, 420, 281, 132, 43, 9, 1, 1, 143, 512, 904, 1014, 792, 447, 183, 53, 10, 1, 1, 232, 932, 1846, 2338, 2087, 1371
Offset: 0

Views

Author

Paul Barry, Dec 25 2003

Keywords

Comments

Riordan array (1/(1-x),x/(1-x-x^2)). - Paul Barry, Sep 13 2006

Examples

			Rows begin {1},{1,1},{1,2,1},{1,4,3,1}...
		

Crossrefs

Row sums are A024537. Diagonal sums are A005578. Second column is A000071. Third column is A006478.
Essentially the vertical partial sums of triangle A037027.

Formula

G.f.: (1-y-y^2) / [(1-y(1+y+z))(1-y)].
Number triangle T(n,k)=sum{j=0..n-k, sum{i=0..n-k-j, C(k+j-1,j)C(j,n-k-i-j)}}; - Paul Barry, Sep 13 2006
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k-1) - T(n-3,k), T(0,0) = T(1,0) = T(1,1) = T(2,0) = T(2,2) = 1, T(2,1) = 2, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 20 2014

A119011 Triangle read by rows: T(n,k) is the number of hill-free Dyck paths of semilength n and having k valleys strictly above the x-axis (0<=k<=n-2; n>=2). A hill in a Dyck path is a peak at level 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 3, 8, 6, 1, 5, 18, 23, 10, 1, 8, 38, 70, 54, 15, 1, 13, 76, 186, 215, 110, 21, 1, 21, 147, 451, 710, 560, 202, 28, 1, 34, 277, 1025, 2065, 2269, 1288, 343, 36, 1, 55, 512, 2220, 5480, 7854, 6321, 2688, 548, 45, 1, 89, 932, 4634, 13574, 24227, 25830
Offset: 2

Views

Author

Emeric Deutsch, May 08 2006

Keywords

Comments

Row sums yield the Fine numbers (A000957). T(n,0)=A000045(n-1) (the Fibonacci numbers). T(n,1)=A006478(n). Sum(k*T(n,k),k=0..n-2)=A119012(n)

Examples

			T(5,2)=6 because we have uud|ud|uuddd, uuudd|ud|udd, uud|uudd|udd, uuud|ud|uddd, uuud|udd|udd and uud|uud|uddd (the valleys above the x-axis are marked with |).
Triangle starts:
1;
1,1;
2,3,1;
3,8,6,1;
5,18,23,10,1;
		

Crossrefs

Programs

  • Maple
    G:=2*t/(2*t+z*t+z-1+sqrt(z^2*t^2-2*z^2*t-2*z*t+z^2-2*z+1))-1: Gser:=simplify(series(G,z=0,15)): for n from 2 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 2 to 12 do seq(coeff(P[n],t,j),j=0..n-2) od; # yields sequence in triangular form

Formula

G.f.: G(t,z)=1/[1-zr(t,z)]-1, where r=r(t,z) is the Narayana function, defined by (1+r)(1+tr)z=r, r(t,0)=0. See Maple program for the explicit form of G(t,z).

A104766 Triangle T(n,k) = A001629(n-k+2) read by rows, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 5, 2, 1, 10, 5, 2, 1, 20, 10, 5, 2, 1, 38, 20, 10, 5, 2, 1, 71, 38, 20, 10, 5, 2, 1, 130, 71, 38, 20, 10, 5, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, Mar 24 2005

Keywords

Comments

The triangle is the matrix square of the triangle A104762: T(n,k) = sum_{j= k..n} A104762(n,j)*A104762(j,k).

Examples

			First few rows of the triangle:
1;
2, 1;
5, 2, 1;
10, 5, 2, 1;
20, 10, 5, 2, 1;
38, 20, 10, 5, 2, 1;
71, 38, 20, 10, 5, 2, 1;
...
		

Crossrefs

Cf. A001629, A104762, A104763, A006478 (row sums).
Showing 1-10 of 12 results. Next