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

A067331 Convolution of Fibonacci F(n+1), n >= 0, with F(n+3), n >= 0.

Original entry on oeis.org

2, 5, 12, 25, 50, 96, 180, 331, 600, 1075, 1908, 3360, 5878, 10225, 17700, 30509, 52390, 89664, 153000, 260375, 442032, 748775, 1265832, 2136000, 3598250, 6052061, 10164540, 17048641, 28559450, 47786400, 79870428, 133359715, 222457608, 370747675, 617363100
Offset: 0

Views

Author

Wolfdieter Lang, Feb 15 2002

Keywords

Comments

Third diagonal of A067330. Third column of A067418.
From Emeric Deutsch, Jun 15 2010: (Start)
a(n) is the external path length of the Fibonacci tree of order n+3. 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 external path length of a tree is the sum of the levels of its external nodes (i.e., leaves).
a(n) = Sum_{k>=0} k*A178524(n+2,k).
(End)
a(n) equals the penultimate immanant of the (n+3) X (n+3) tridiagonal matrix with ones along the main diagonal, the superdiagonal, and the subdiagonal. - John M. Campbell, Jan 01 2016
a(n) is the sum of the eccentricities of the vertices of the Fibonacci cube G(n+1). Example: a(1)=5; indeed, the Fibonacci cube G(2) is the path graph P(3), the vertices of which have eccentricities 2, 1, 2. - Emeric Deutsch, May 28 2017

Examples

			From _John M. Campbell_, Jan 03 2016: (Start)
Letting n=2, the external path length of the Fibonacci tree T(5) of order n+3=5 illustrated below is 12 = a(2) = F(1)*F(5) + F(2)*F(4) + F(3)*F(3).
     .
    / \
   /\ /\
  /\
(End)
		

References

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

Crossrefs

Programs

  • Magma
    [((7*n+10)*Fibonacci(n+1)+4*(n+1)*Fibonacci(n))/5: n in [0..40]]; // Vincenzo Librandi, Jan 02 2016
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 2*a(n-1)+a(n-2) - 2*a(n-3)-a(n-4),a(0)=2,a(1)=5,a(2)=12,a(3)=25},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Jan 06 2016
  • Mathematica
    LinearRecurrence[{2, 1, -2, -1}, {2, 5, 12, 25}, 70] (* Vincenzo Librandi, Jan 02 2016 *)
    Table[SeriesCoefficient[(2 + x)/(1 - x - x^2)^2, {x, 0, n}], {n, 0, 34}] (* Michael De Vlieger, Jan 02 2016 *)
    Print[Table[Sum[Binomial[n + 3 - i, i]*(n + 2 - 2*i), {i, 0, Floor[(n + 3)/2]}], {n, 0, 100}]] (* John M. Campbell, Jan 04 2016 *)
    Module[{nn=40,fibs},fibs=Fibonacci[Range[nn]];Table[ListConvolve[Take[ fibs,n],Take[fibs,{2,n+2}]],{n,nn-2}]][[All,2]] (* Harvey P. Dale, Aug 03 2019 *)
  • PARI
    Vec((2+x)/(1-x-x^2)^2 + O(x^100)) \\ Altug Alkan, Jan 04 2016

Formula

a(n) = A067330(n+2, n) = A067418(n+2, 2) = Sum_{k=0..n} F(k+1)*F(n+3-k), n >= 0.
a(n) = ((7*n + 10)*F(n + 1) + 4*(n + 1)*F(n))/5, with F(n) = A000045(n) (Fibonacci).
G.f.: (2 + x)/(1 - x - x^2)^2.
a(n) = Sum_{i=0..floor((n+3)/2)} binomial(n+3-i, i)*(n + 2 - 2*i). - John M. Campbell, Jan 04 2016
E.g.f.: exp(x/2)*((50 + 55*x)*cosh(sqrt(5)*x/2) + sqrt(5)*(18 + 25*x)*sinh(sqrt(5)*x/2))/25. - Stefano Spezia, Dec 04 2023

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

A318267 a(n) is 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 two such pairs are joined by an edge.

Original entry on oeis.org

0, 0, 1, 8, 39, 138, 414, 1104, 2715, 6282, 13875, 29540, 61060, 123192, 243589, 473540, 907335, 1716974, 3214066, 5959704, 10958687, 20001526, 36264579, 65359752, 117165096, 209008464, 371190217, 656540768, 1156924167, 2031676818, 3556517478
Offset: 0

Views

Author

Donovan Young, Aug 22 2018

Keywords

Comments

The generating function has been obtained using the calculus of the rook polynomial associated with A046741.
The case of all but one pair joined by an edge is given by A178523(n-1). The case of all pairs joined by an edge is given by A000045(n+1), i.e., the number of perfect matchings in the ladder graph.
This is also the number of "(n-2)-domino" configurations in the game of memory played on a 2 X n rectangular array, see [Young]. - Donovan Young, Oct 23 2018

Examples

			Consider the case n=3. Let the 2 X 3 grid have vertex set {O(0, 0), A(1, 0), B(2, 0), C(2, 1), D(1, 1), E(0, 1)} and edge set {OA, AB, ED, DC, OE, AD, BC}.
If DC represents the one pair which is joined by an edge, the remaining pairs must be placed on AE and OB; there are three other such configurations where the joined pair is placed instead on ED, OA, or AB. Our count is now at 4. If the joined pair is placed on OE then the remaining pairs must be placed on BD and AC; there is one other such configuration where the joined pair is placed on BC, bringing the count to 6. Finally, let the joined pair be placed on AD, then the remaining pairs may be placed either on OB, EC or on OC, EB, and thus we have a(3) = 8.
		

Crossrefs

Programs

  • GAP
    a:=[0, 0, 1, 8, 39, 138, 414, 1104];;  for n in [9..35] do a[n]:=5*a[n-1]-7*a[n-2]-2*a[n-3]+10*a[n-4]-2*a[n-5]-5*a[n-6]+a[n-7]+a[n-8]; od; a; # Muniru A Asiru, Oct 23 2018
  • Maple
    seq(coeff(series(x^2*(1+3*x+6*x^2+x^3+3*x^4)/((1-x)^2*(1-x-x^2)^3),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 23 2018
  • Mathematica
    CoefficientList[Normal[Series[x^2(1 + 3*x + 6*x^2 + x^3 + 3*x^4)/(1 - x)^2/(1 - x - x^2)^3, {x, 0, 30}]], x]

Formula

G.f.: x^2*(1 + 3*x + 6*x^2 + x^3 + 3*x^4)/((1 - x)^2*(1 - x - x^2)^3).

A080018 Triangle of coefficients of polynomials P(n; x) = Permanent(M), where M=[m(i,j)] is n X n matrix defined by m(i,j)=x if -1<=i-j<=1 else m(i,j)=1.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 1, 2, 3, 1, 2, 10, 6, 5, 4, 20, 28, 44, 16, 8, 29, 104, 207, 180, 151, 36, 13, 206, 775, 1288, 1407, 830, 437, 76, 21, 1708, 6140, 10366, 10384, 7298, 3100, 1138, 152, 34, 15702, 55427, 91296, 92896, 63140, 31278, 10048, 2744, 294, 55
Offset: 0

Views

Author

Keywords

Examples

			1;
0,  1;
0,  0,  2;
0,  1,  2,  3;
1,  2, 10,  6,  5;
4, 20, 28, 44, 16, 8;
...
P(4; x) = Permanent(MATRIX([[x, x, 1, 1], [x, x, x, 1], [1, x, x, x], [1, 1, x, x]])) = 1+2*x+10*x^2+6*x^3+5*x^4.
		

References

  • J. Riordan, The enumeration of permutations with three-ply staircase restrictions, unpublished memorandum, Bell Telephone Laboratories, Murray Hill, NJ, Oct 1963. See Table 1. - N. J. A. Sloane, Aug 27 2013

Crossrefs

Row sums = A000142, first column = A001883, second column = A001884, third column = A001885, fourth column = A001886.
Main diagonal and lower diagonal give: A000045(n+1), A178523. - Alois P. Heinz, Jul 03 2013

Programs

  • Maple
    with(LinearAlgebra):
    T:= proc(n) option remember; local p;
          if n=0 then 1 else
            p:= Permanent(Matrix(n, (i,j)-> `if`(abs(i-j)<2, x, 1)));
            seq(coeff(p, x, i), i=0..n)
          fi
        end:
    seq(T(n), n=0..10);  # Alois P. Heinz, Jul 03 2013
  • Mathematica
    t[0] = {1}; t[n_] := CoefficientList[Permanent[Array[If[Abs[#1 - #2] < 2, x, 1]&, {n, n}]], x]; Table[t[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)

A178522 Triangle read by rows: T(n,k) is the number of nodes at level k in the Fibonacci tree of order n (n>=0, 0<=k<=n-1).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 2, 4, 2, 1, 2, 4, 6, 2, 1, 2, 4, 8, 8, 2, 1, 2, 4, 8, 14, 10, 2, 1, 2, 4, 8, 16, 22, 12, 2, 1, 2, 4, 8, 16, 30, 32, 14, 2, 1, 2, 4, 8, 16, 32, 52, 44, 16, 2, 1, 2, 4, 8, 16, 32, 62, 84, 58, 18, 2, 1, 2, 4, 8, 16, 32, 64, 114, 128, 74, 20, 2, 1, 2, 4, 8, 16, 32, 64, 126
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.
Sum of entries in row n is A001595(n).
Sum_{k=0..n-1} k*T(n,k) = A178523(n).

Examples

			Triangle starts:
1,
1,
1,2,
1,2,2,
1,2,4,2,
1,2,4,6,2,
1,2,4,8,8,2,
1,2,4,8,14,10,2,
1,2,4,8,16,22,12,2,
1,2,4,8,16,30,32,14,2,
...
		

References

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

Crossrefs

Cf. A001595, A059214, A178523, A067331, A002940. See A059250 for another version.

Programs

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

Formula

G.f.: G(t,z)=(1-tz+tz^2)/[(1-z)(1-tz-tz^2)].
T(k,n) = T(k-1,n-1)+T(k-1,n) with T(0,0)=1, T(k,0)=1 for k>0, T(0,n)=2 for n>0. - Frank M Jackson, Aug 30 2011

A325753 Triangle read by rows giving the number of configurations of n indistinguishable pairs placed on the vertices of the ladder graph P_2 X P_n such that exactly k such pairs are joined by an edge.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 2, 8, 2, 3, 21, 34, 39, 6, 5, 186, 347, 250, 138, 16, 8, 2113, 3666, 2919, 1234, 414, 36, 13, 27856, 47484, 36714, 17050, 4830, 1104, 76, 21, 422481, 707480, 545788, 253386, 78815, 16174, 2715, 152, 34, 7241480, 11971341, 9195198, 4317996, 1369260, 309075, 48444, 6282, 294, 55
Offset: 0

Views

Author

Donovan Young, May 18 2019

Keywords

Comments

This is the number of "k-domino" configurations in the game of memory played on a 2 X n rectangular array, see [Young]. First column is A265167, second column is A318244. Diagonals are given by A000045, A178523, A318267, A318268, A318269, A318270.

Examples

			The first few rows of T(n,k) are:
   1;
   0,  1;
   1,  0,  2;
   2,  8,  2,  3;
  21, 34, 39,  6, 5;
  ...
For n = 2 there is only one way to place the two pairs such that neither is joined by an edge, hence T(2,0)=1. If one pair is joined by an edge, the other is forced to be, hence T(2,1) = 0, and since the pairs can be joined horizontally or vertically T(2,2) = 2.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Normal[Series[Sum[Factorial2[2*k-1]*y^k*(1-(1-z)*y)^k/(1+(1-z)*y)^k/(1+(1-z)*y-(1-z)^2*y^2)^(k+1),{k,0,20}],{y,0,20}]],{y,z}];

Formula

G.f.: Sum_{j>=0} (2*j-1)!! * y^j * (1-(1-z)*y)^j / (1+(1-z)*y)^j / (1+(1-z)*y-(1-z)^2*y^2)^(j+1).

A325754 Triangle read by rows giving the number of configurations of n indistinguishable pairs placed on the vertices of the ladder graph P_2 X P_n such that exactly k such pairs are joined by a horizontal edge.

Original entry on oeis.org

1, 1, 0, 2, 0, 1, 7, 4, 4, 0, 43, 38, 21, 2, 1, 372, 360, 168, 36, 9, 0, 4027, 3972, 1818, 478, 93, 6, 1, 51871, 51444, 23760, 6640, 1260, 144, 16, 0, 773186, 768732, 358723, 103154, 20205, 2734, 278, 12, 1, 13083385, 13027060, 6129670, 1796740, 363595, 52900, 5650, 400, 25, 0
Offset: 0

Views

Author

Donovan Young, May 19 2019

Keywords

Comments

This is the number of "k-horizontal-domino" configurations in the game of memory played on a 2 X n rectangular array, see [Young].

Examples

			The first few rows of T(n,k) are:
  1;
  1,  0;
  2,  0,  1;
  7,  4,  4,  0;
  43, 38, 21, 2, 1;
  ...
For n=2, let the vertex set of P_2 X P_2 be {A,B,C,D} and the edge set be {AB, AC, BD, CD}, where AB and CD are horizontal edges. For k=0, we may place the pairs on A, C and B, D or on A, D and B, C, hence T(2,0) = 2. If we place a pair on one of the horizontal edges we are forced to place the other pair on the remaining horizontal edge, hence T(2,1)=0 and T(2,2)=1.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Normal[Series[Sum[Factorial2[2*k-1]*y^k/(1-(1-z)*y)/(1+(1-z)*y)^(2*k+1), {k, 0, 20}], {y, 0, 20}]], {y, z}];

Formula

G.f.: Sum_{j>=0} (2*j-1)!! y^j/(1-(1-z)*y)/(1+(1-z)*y)^(2*j+1).
E.g.f.: exp((sqrt(1 - 2 y)-1) (1 - z))/sqrt(1 - 2 y) - exp((y - 2) (1 - z)) sqrt(Pi/2) sqrt(1 - z) (-erfi(sqrt(2) sqrt(1 - z)) + erfi(((1 + sqrt(1 - 2 y)) sqrt(1 - z))/sqrt(2))).
Showing 1-7 of 7 results.