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

A338293 Number of matchings in the complete binary tree of n rows.

Original entry on oeis.org

1, 1, 3, 15, 495, 467775, 448046589375, 396822986774382287109375, 316789536051348354157896789538095888519287109375
Offset: 0

Views

Author

Kevin Ryde, Oct 21 2020

Keywords

Comments

A recurrence is formed by considering the root vertex matched or unmatched and a(n-1) or a(n-2) matchings in the subtrees below.
unmatched matched matched
/ \ / \\ // \
any any any matched matched any
/ \ / \
any any any any
so:
a(n-1)^2 + 2 * a(n-1)*a(n-2)^2 = a(n)
The Jacobsthal product formula (below) follows from this recurrence by induction by substituting the products for a(n-1) and a(n-2) and using J(n+1) = J(n) + 2*J(n-1) (its recurrence in A001045).
The Jacobsthal product terms, with multiplicity, in a(n) are a subset of the terms in any bigger a(m), so a(n) divides any bigger a(m) and so in particular this is a divisibility sequence.
Asymptotically, a(n) ~ (1/2)*C^(2^n) where C = 1.537176.. = A338294. For growth power C, let c(n) = (2*a(n))^(1/2^n) so that C = lim_{n->oo} c(n). The Jacobsthal products formula gives log(c(n)) = log(2)/2^n + log(J(n+1))/2^n + Sum_{k=1..n} log(J(k))/2^k. Then discarding log(J(1)) = log(J(2)) = 0, and log(2)/2^n -> 0, and log(J(n+1))/2^n -> 0, leaves the terms of A242049 so that log(C) = A242049.
The asymptotic factor F = 1/2 is found by letting f(n) = a(n)/a(n-1)^2, so f(n) = J(n+1) / J(n) by the products formula, and f(n) = 2 + (-1)^n/J(n) -> 2 = 1/F. This factor makes no difference to the growth power C, since any F^(1/2^n) -> 1, but it brings the approximation closer to a(n) sooner.

Examples

			n=0 rows is the empty tree and n=1 row is a single vertex.  Both have only the empty matching so a(0) = a(1) = 1.
n=2 rows is a path-3 and has 3 matchings: first two vertices, last two, or the empty matching, so a(2) = 3.
Jacobsthal products formula:
  a(4) = J(5) * J(4) * J(3)^2 * J(2)^4 * J(1)^8
       =  11  *   5  *    3^2 *    1^4 *    1^8 = 495.
		

Crossrefs

Cf. A001045 (Jacobsthal numbers), A338294 (growth power), A242049 (log of growth power).
Cf. A076725 (independent sets), A158681 (Wiener index), A000975 (independence number and matching number).

Programs

  • PARI
    a(n) = my(x=1,y=1); for(i=2,n, [x,y] = [x^2 + 2*x*y^2, x]); x;

Formula

a(n) = a(n-1)^2 + 2*a(n-1)*a(n-2)^2 starting a(0)=1 and a(1)=1.
a(n) = J(n+1) * J(n) * J(n-1)^2 * J(n-2)^4 * ... * J(1)^(2^(n-1)) where J(n) = (2^n - (-1)^n)/3 = A001045(n) is the Jacobsthal numbers.
A228607(n) = a(n+1)^2*(a(n+1)+3*a(n)^2). - R. J. Mathar, Jul 22 2022

A383235 Triangle read by rows: T(n,k) = 2*floor(k/2)*T(n-1,k) + T(n-1,k-1), 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 4, 4, 1, 0, 0, 8, 12, 8, 1, 0, 0, 16, 32, 44, 12, 1, 0, 0, 32, 80, 208, 92, 18, 1, 0, 0, 64, 192, 912, 576, 200, 24, 1, 0, 0, 128, 448, 3840, 3216, 1776, 344, 32, 1, 0, 0, 256, 1024, 15808, 16704, 13872, 3840, 600, 40, 1
Offset: 0

Views

Author

Ven Popov, Apr 20 2025

Keywords

Comments

Row sums give A007472.
The recurrence is analogous to that of Stirling numbers of the 2nd kind (A048993), but with a parity constraint. For even columns, T(n+1, 2*k) = 2*k*T(n, 2*k) + T(n, 2*k-1); for odd columns, T(n+1, 2*k+1) = 2*k*T(n, 2*k+1) + T(n, 2*k).
T(n,k) appear as coefficients in the following polynomials (which themselves are coefficients of t^n in the bivariate e.g.f.:
P_0(x) = 1
P_1(x) = 0 + x
P_2(x) = 0 + 0 + x^2
P_3(x) = 0 + 0 + 2x^2 + x^3
P_4(x) = 0 + 0 + 4x^2 + 4x^3 + x^4
P_5(x) = 0 + 0 + 8x^2 + 12x^3 + 8x^4 + x^5
P_6(x) = 0 + 0 + 16x^2 + 32x^3 + 44x^4 + 12x^5 + x^6
P_n(1) gives A007472.
T(n,k) enumerates the number of ways to partition n labeled objects in k compartments of urns with two compartments each with the following constraints:
- you can initially place a marble in any compartment of any urn
- you cannot use the same compartment in an urn again until you've used its other compartment
- you can freely place objects in any compartment of urns where both compartments are already used
- you cannot open a new urn until both compartments of all previously used urns are filled
Examples:
For T(3,2) we have two ways to place the objects in two compartments of a single urn
- {13|2}
- {1|23}
For T(3,3) we have one way to place each object in its own compartment (2 urns, 3 compartments used):
- {1|2}{3|}
For 4 objects we have:
- 4 cases for Z(4,2):
{134|2}
{14|23}
{13|24}
{1|234}
- 4 cases for Z(4,3):
{{13|2},{4|}}
{{1|23},{4|}}
{{14|2},{3|}}
{{1|24},{3|}}
- 1 case for Z(4,4):
{{1|2}, {3|4}}
Then A007472 counts the total number of ways to partition n labeled objects in such nonempty two-compartment urns.

Examples

			The triangle T(n,k) begins:
  n\k 0 1    2     3      4       5       6      7      8     9   10 11 12
  0:  1
  1:  0 1
  2:  0 0    1
  3:  0 0    2     1
  4:  0 0    4     4      1
  5:  0 0    8    12      8       1
  6:  0 0   16    32     44      12       1
  7:  0 0   32    80    208      92      18      1
  8:  0 0   64   192    912     576     200     24      1
  9:  0 0  128   448   3840    3216    1776    344     32     1
  10: 0 0  256  1024  15808   16704   13872   3840    600    40    1
  11: 0 0  512  2304  64256   82624   99936  36912   8640   920   50  1
  12: 0 0 1024  5120 259328  394752  682240 321408 106032 16000 1420 60  1
------------------------------------------------------------------------
Recurrence:
S(5,3) = 2*Floor(3/2)*S(4,3) + S(4,2) = 2*4 + 4 = 12.
S(5,4) = 2*Floor(4/2)*S(4,4) + S(4,3) = 4*1 + 4 = 8.
		

Crossrefs

Cf. A048993. Row sums give A007472. Column T(n+2,2) gives A000079(n). Column T(n+2,3) gives A001787(n). Column T(n+2,4) gives A100575(n). Column T(n+5,5)*4 gives A158681(n). T(n+1,n) gives A007590(n).

Programs

  • Mathematica
    Z[0,0,m_]=1;
    Z[0,k_,m_]:=0/;k>0;
    Z[n_,0,m_]:=0/;n>0;
    Z[n_,k_,m_]:=Z[n,k,m]=m*Floor[k/m]*Z[n-1,k,m]+Z[n-1,k-1,m];
    Flatten[Table[Z[n,k,2],{n,0,12},{k,0,n}]]

Formula

T(n, k) = 2*Floor(k/2)*T(n-1, k) + T(n-1, k-1), n > 0; T(0, k) = 0, k > 0; T(0, 0) = 1.
E.g.f.: A[x_, t_] := x*(BesselK[0,x] + BesselK[1,x])*BesselI[0,x*Exp[t]] + x*(BesselI[1,x] - BesselI[0,x])*BesselK[0, x Exp[t]] where T(n,k) are the coefficients of x^k for t^n. The much simpler formula BesselI[0,x*Exp[t]] produces the same coefficients but with carrier alternating BesselI[0,x] and BesselI[1,x] functions at even and odd coefficients.
Showing 1-2 of 2 results.