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.

A329369 Number of permutations of {1,2,...,m} with excedance set constructed by taking m-i (0 < i < m) if b(i-1) = 1 where b(k)b(k-1)...b(1)b(0) (0 <= k < m-1) is the binary expansion of n.

Original entry on oeis.org

1, 1, 3, 1, 7, 3, 7, 1, 15, 7, 17, 3, 31, 7, 15, 1, 31, 15, 37, 7, 69, 17, 37, 3, 115, 31, 69, 7, 115, 15, 31, 1, 63, 31, 77, 15, 145, 37, 81, 7, 245, 69, 155, 17, 261, 37, 77, 3, 391, 115, 261, 31, 445, 69, 145, 7, 675, 115, 245, 15, 391, 31, 63, 1, 127, 63
Offset: 0

Views

Author

Mikhail Kurkov, Nov 12 2019

Keywords

Comments

Another version of A152884.
The excedance set of a permutation p of {1,2,...,m} is the set of indices i such that p(i) > i; it is a subset of {1,2,...,m-1}.
Great work on this subject was done by R. Ehrenborg and E. Steingrimsson, so most of the formulas given below are just their results translated into the language of the sequences which are related to the binary expansion of n.
Conjecture 1: equivalently, number of open tours by a biased rook on a specific f(n) X 1 board, which ends on a white cell, where f(n) = A070941(n) = floor(log_2(2n)) + 1 and cells are colored white or black according to the binary representation of 2n. A cell is colored white if the binary digit is 0 and a cell is colored black if the binary digit is 1. A biased rook on a white cell moves only to the left and otherwise moves only to the right. - Mikhail Kurkov, May 18 2021
Conjecture 2: this sequence is an inverse modulo 2 binomial transform of A284005. - Mikhail Kurkov, Dec 15 2021

Examples

			a(1) = 1 because the 1st excedance set is {m-1} and the permutations of {1,2,...,m} with such excedance set are 21, 132, 1243, 12354 and so on, i.e., for a given m we always have 1 permutation.
a(2) = 3 because the 2nd excedance set is {m-2} and the permutations of {1,2,...,m} with such excedance set are 213, 312, 321, 1324, 1423, 1432, 12435, 12534, 12543 and so on, i.e., for a given m we always have 3 permutations.
a(3) = 1 because the 3rd excedance set is {m-2, m-1} and the permutations of {1,2,...,m} with such excedance set are 231, 1342, 12453 and so on, i.e., for a given m we always have 1 permutation.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember;  2^padic[ordp](n, 2) end:
    a:= proc(n) option remember; `if`(n=0, 1, (h-> a(h)+
         `if`(n::odd, 0, (t-> a(h-t)+a(n-t))(g(h))))(iquo(n, 2)))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 30 2023
  • Mathematica
    a[n_] := a[n] = Which[n == 0, 1, OddQ[n], a[(n-1)/2], True, a[n/2] + a[n/2 - 2^IntegerExponent[n/2, 2]] + a[n - 2^IntegerExponent[n/2, 2]]];
    a /@ Range[0, 65] (* Jean-François Alcover, Feb 13 2020 *)
  • PARI
    upto(n) = my(A, v1); v1 = vector(n+1, i, 0); v1[1] = 1; for(i=1, n, v1[i+1] = v1[i\2+1] + if(i%2, 0, A = 1 << valuation(i/2, 2); v1[i/2-A+1] + v1[i-A+1])); v1 \\ Mikhail Kurkov, Jun 06 2024

Formula

a(2n+1) = a(n) for n >= 0.
a(2n) = a(n) + a(n - 2^f(n)) + a(2n - 2^f(n)) for n > 0 with a(0) = 1 where f(n) = A007814(n) (equivalent to proposition 2.1 at the page 286, see R. Ehrenborg and E. Steingrimsson link).
a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m+1,k) a(2^k*n) = a(2^m*n) + a(2^(m-1)*(2n+1)) + a(2^(m-1)*(4n+1)) for m > 0, n >= 0 (equivalent to proposition 2.5 at the page 287, see R. Ehrenborg and E. Steingrimsson link).
a(2n) = a(2*g(n)) + a(2n - 2^h(n)) + a(2*g(n) + 2^h(n)) for n > 0 with a(0) = 1 where g(n) = A053645(n), h(n) = A063250(n) (equivalent to proposition 2.1 at the page 286, see R. Ehrenborg and E. Steingrimsson link).
a(2n) = 2*a(n + g(n)) + a(2*g(n)) for n > 0, floor(n/3) < 2^(floor(log_2(n))-1) (in other words, for 2^m + k where 0 <= k < 2^(m-1), m > 0) with a(0) = 1 (just a special case of the previous formula, because for 2^m + k where 0 <= k < 2^(m-1), m > 0 we have 2^h(n) = n - g(n)).
a(2n) = a(f(n,-1)) + a(f(n,0)) + a(f(n,1)) for n > 0 with a(0) = 1 where f(n,k) = 2*(f(floor(n/2),k) + n mod 2) + k*A036987(n) for n > 1 with f(1,k) = abs(k) (equivalent to a(2n) = a(2*g(n)) + a(2n - 2^h(n)) + a(2*g(n) + 2^h(n))).
a(n) = Sum_{j=0..2^wt(n) - 1} (-1)^(wt(n) - wt(j)) Product_{k=0..wt(n) - 1} (1 + wt(floor(j/2^k)))^T(n,k) for n > 0 with a(0) = 1 where wt(n) = A000120(n), T(n,k) = T(floor(n/2), k - n mod 2) for k > 0 with T(n,0) = A001511(n) (equivalent to theorem 6.3 at page 296, see R. Ehrenborg and E. Steingrimsson link). Here T(n, k) - 1 for k > 0 is the length of the run of zeros between k-th pair of ones from the right side in the binary expansion of n. Conjecture 1: this formula is equivalent to inverse modulo 2 binomial transform of A284005.
Sum_{k=0..2^n-1} a(k) = (n+1)! for n >= 0.
a((4^n-1)/3) = A110501(n+1) for n >= 0.
a(2^2*(2^n-1)) = A091344(n+1),
a(2^3*(2^n-1)) = A091347(n+1),
a(2^4*(2^n-1)) = A091348(n+1).
More generally, a(2^m*(2^n-1)) = a(2^n*(2^m-1)) = S(n+1,m) for n >= 0, m >= 0 where S(n,m) = Sum_{k=1..n} k!*k^m*Stirling2(n,k)*(-1)^(n-k) (equivalent to proposition 6.5 at the page 297, see R. Ehrenborg and E. Steingrimsson link).
Conjecture 2: a(n) = (1 + A023416(n))*a(g(n)) + Sum_{k=0..floor(log_2(n))-1} (1-R(n,k))*a(g(n) + 2^k*(1 - R(n,k))) for n > 1 with a(0) = 1, a(1) = 1, where g(n) = A053645(n) and where R(n,k) = floor(n/2^k) mod 2 (at this moment this is the only formula here, which is not related to R. Ehrenborg's and E. Steingrimsson's work and arises from another definition given above, exactly conjectured definition with a biased rook). Here R(n,k) is the (k+1)-th bit from the right side in the binary expansion of n. - Mikhail Kurkov, Jun 23 2021
From Mikhail Kurkov, Jan 23 2023: (Start)
The formulas below are not related to R. Ehrenborg's and E. Steingrimsson's work.
Conjecture 3: a(n) = A357990(n, 1) for n >= 0.
Conjecture 4: a(2^m*(2k+1)) = Sum_{i=1..wt(k) + 2} i!*i^m*A358612(k, i)*(-1)^(wt(k) - i) for m >= 0, k >= 0 where wt(n) = A000120(n).
Conjecture 5: a(2^m*(2^n - 2^p - 1)) = Sum_{i=1..n} i!*i^m*(-1)^(n - i)*((i - p + 1)*Stirling2(n, i) - Stirling2(n - p, i - p) + Sum_{j=0..p-2} (p - j - 1)*Stirling2(n - p, i - j)/j! Sum_{k=0..j} (i - k)^p*binomial(j, k)*(-1)^k) for n > 2, m >= 0, 0 < p < n - 1. Here we consider that Stirling2(n, k) = 0 for n >= 0, k < 0. (End)
Conjecture 6: a(2^m*n + q) = Sum_{i=A001511(n+1)..A000120(n)+1} A373183(n, i)*a(2^m*(2^(i-1)-1) + q) for n >= 0, m >= 0, q >= 0. Note that this formula is recursive for n != 2^k - 1. Also, it is not related to R. Ehrenborg's and E. Steingrimsson's work. - Mikhail Kurkov, Jun 05 2024
From Mikhail Kurkov, Jul 10 2024: (Start)
a(2^m*(2^n*(2k+1) - 1)) = Sum_{i=1..m+1} a(2^i*k)*(-1)^(m-i+1)*Sum_{j=i..m+1} j^n*Stirling1(j, i)*Stirling2(m+1, j) for m >= 0, n >= 0, k >= 0 with a(0) = 1.
Proof: start with a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m+1,k) a(2^k*n) given above and rewrite it as a(2^m*(2^n*(2k+1) - 1)) = Sum_{i=0..m} binomial(m+1, i) a(2^i*(2^(n-1)*(2k+1) - 1)).
Then conjecture that a(2^m*(2^n*(2k+1) - 1)) = Sum_{i=1..m+1} a(2^i*k)*f(n, m, i). From that it is obvious that f(0, m, i) = [i = (m+1)].
After that use a(2^m*(2^n*(2k+1) - 1)) = Sum_{i=0..m} binomial(m+1, i) Sum_{j=1..i+1} a(2^j*k)*f(n-1, i, j) = Sum_{i=1..m+1} a(2^i*k) Sum_{j=i-1..m} binomial(m+1, j)*f(n-1, j, i). From that it is obvious that f(n, m, i) = Sum_{j=i-1..m} binomial(m+1, j)*f(n-1, j, i).
Finally, all we need is to show that basic conditions and recurrence for f(n, m, i) gives f(n, m, i) = (-1)^(m-i+1)*Sum_{j=i..m+1} j^n*Stirling1(j, i)*Stirling2(m+1, j) (see Max Alekseyev link).
a(2^m*(2k+1)) = a(2^(m-1)*k) + (m+1)*a(2^m*k) + Sum_{i=1..m-1} a(2^m*k + 2^i) for m > 0, k >= 0.
Proof: start with a(2^(m+1)*(2k+1)) = a(2^m*k) + (m+2)*a(2^(m+1)*k) + Sum_{i=1..m} a(2^(m+1)*k + 2^i).
Then use a(2^m*(4k+1)) = a(2^m*k) + (m+1)*a(2^(m+1)*k) + Sum_{i=1..m-1} a(2^(m+1)*k + 2^i).
From that we get a(2^(m+1)*(2k+1)) - a(2^m*k) - (m+2)*a(2^(m+1)*k) - a(2^(m+1)*k + 2^m) = a(2^m*(4k+1)) - a(2^m*k) - (m+1)*a(2^(m+1)*k).
Finally, a(2^(m+1)*(2k+1)) = a(2^(m+1)*k) + a(2^m*(2*k+1)) + a(2^m*(4k+1)) which agrees with the a(2^m*(2n+1)) = a(2^m*n) + a(2^(m-1)*(2n+1)) + a(2^(m-1)*(4n+1)) given above.
This formula can be considered as an alternative to a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m+1,k) a(2^k*n). There are algorithms for both these formulas that allow you to calculate them without recursion. However, even though it is necessary to calculate binomial coefficients in the mentioned formula, the triple-looped algorithm for it still works faster (see Peter J. Taylor link).
It looks like you can also change v2 in the mentioned algorithm to vector with elements a(2^m*(2^(i+A007814(n+1)-1)-1) + q) to get a(2^m*n + q) instead of a(n). This may have common causes with formula that uses A373183 given above. (End)
From Mikhail Kurkov, Jan 27 2025: (Start)
The formulas below are not related to R. Ehrenborg's and E. Steingrimsson's work.
Conjecture 7: A008292(n+1,k+1) = Sum_{i=0..2^n-1} [A000120(i) = k]*a(i) for n >= 0, k >= 0.
Conjecture 8: a(2^m*(2^n*(2k+1)-1)) = Sum_{i=0..m} Sum_{j=0..m-i} Sum_{q=0..i} binomial(m-i,j)*(m-j+1)^n*a(2^(q+1)*k)*L(m,i,q)*(-1)^j for m >= 0, n > 0, k >= 0 where L(n,k,m) = W(n-m,k-m,m+1) for n > 0, 0 <= k < n, 0 <= m <= k and where W(n,k,m) = (k+m)*W(n-1,k,m) + (n-k)*W(n-1,k-1,m) + [m > 1]*W(n,k,m-1) for 0 <= k < n, m > 0 with W(0,0,m) = 1, W(n,k,m) = 0 for n < 0 or k < 0.
In particular, W(n, k, 1) = A173018(n, k), W(n, k, 2) = A062253(n, k), W(n, k, 3) = A062254(n, k) and W(n, k, 4) = A062255(n, k).
Conjecture 9: a(n) = b(n,wt(n)) for n >= 0 where b(2n+1,k) = b(n,k) + (wt(n)-k+2)*b(n,k-1), b(2n,k) = (wt(n)-k+1)*b(2n+1,k) for n > 0, k > 0 with b(n,0) = A341392(n) for n >= 0, b(0,k) = 0 for k > 0 and where wt(n) = A000120(n) (see A379817).
More generally, a(2^m*(2k+1)) = ((m+1)!)^2*b(k,wt(k)-m) - Sum_{j=1..m} Stirling1(m+2,j+1)*a(2^(j-1)*(2k+1)) for m >= 0, k >= 0. Here we also consider that b(n,k) = 0 for k < 0. (End)
Conjecture 10: if we change b(n,0) = A341392(n) given above to b(n,0) = A341392(n)*x^n, then nonzero terms of the resulting polynomials for b(n,wt(n)) form c(n,k) such that a(n) = Sum_{k=0..A080791(n)} c(n,k) for n >= 0 where c(n,k) = (Product_{i=0..k-1} (1 + 1/A000120(floor(n/2^(A000523(n)-i))))) * Sum_{j=max{0,k-A080791(n)+A080791(A053645(n))}..A080791(A053645(n))} c(A053645(n),j) for n > 0, k >= 0 with c(0,0) = 1, c(0,k) = 0 for k > 0. - Mikhail Kurkov, Jun 19 2025

A011965 Second differences of Bell numbers.

Original entry on oeis.org

1, 2, 7, 27, 114, 523, 2589, 13744, 77821, 467767, 2972432, 19895813, 139824045, 1028804338, 7905124379, 63287544055, 526827208698, 4551453462543, 40740750631417, 377254241891064, 3608700264369193, 35613444194346451, 362161573323083920, 3790824599495473121
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n+3 with at least one singleton and with the smallest element in a singleton equal to 3. Alternatively, number of partitions of n+3 with at least one singleton and with the largest element in a singleton equal to n+1. - Olivier GERARD, Oct 29 2007
Out of the A005493(n) set partitions with a specific two elements clustered separately, number that have a different set of two elements clustered separately. - Andrey Goder (andy.goder(AT)gmail.com), Dec 17 2007

References

  • Olivier Gérard and Karol A. Penson, A budget of set partition statistics, in preparation, unpublished as of Sep 22 2011.

Crossrefs

Programs

  • Magma
    [Bell(n+2) -2*Bell(n+1) + Bell(n): n in [0..40]]; // G. C. Greubel, Jan 07 2025
    
  • Maple
    a:= n-> add((-1)^k*binomial(2,k)*combinat['bell'](n+k), k=0..2): seq(a(n), n=0..20);  # Alois P. Heinz, Sep 05 2008
  • Mathematica
    Differences[BellB[Range[0, 30]], 2] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011965_list, blist, b = [1], [1, 2], 2
    for _ in range(1000):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A011965_list.append(blist[-3])
    # Chai Wah Wu, Sep 02 2014
    
  • Python
    # or Sagemath
    b=bell_number
    print([b(n+2) -2*b(n+1) +b(n) for n in range(41)]) # G. C. Greubel, Jan 07 2025

Formula

a(n) = A005493(n) - A005493(n-1).
E.g.f.: exp(exp(x)-1)*(exp(2*x)-exp(x)+1). - Vladeta Jovovic, Feb 11 2003
a(n) = A000110(n) - 2*A000110(n-1) + A000110(n-2). - Andrey Goder (andy.goder(AT)gmail.com), Dec 17 2007
G.f.: G(0) where G(k) = 1 - 2*x*(k+1)/((2*k+1)*(2*x*k+2*x-1) - x*(2*k+1)*(2*k+3)*(2*x*k+2*x-1)/(x*(2*k+3) - 2*(k+1)*(2*x*k+3*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 19 2012
G.f.: 1 - G(0) where G(k) = 1 - 1/(1-k*x-2*x)/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 17 2013
G.f.: 1 - 1/x + (1-x)^2/x/(G(0)-x) where G(k) = 1 - x*(k+1)/(1 - x/G(k+1) ); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
G.f.: G(0)*(1-1/x) where G(k) = 1 - 1/(1-x*(k+1))/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 07 2013
a(n) ~ n^2 * Bell(n) / LambertW(n)^2 * (1 - 2*LambertW(n)/n). - Vaclav Kotesovec, Jul 28 2021
Conjecture: a(n) = Sum_{k=0..2^n - 1} b(k) for n >= 0 where b(2n+1) = b(n) + b(A025480(n-1)), b(2n) = b(n - 2^f(n)) + b(2n - 2^f(n)) + b(A025480(n-1)) for n > 0 with b(0) = b(1) = 1 and where f(n) = A007814(n). Also b((4^n - 1)/3) = A141154(n+1). - Mikhail Kurkov, Jan 27 2022

A090365 Shifts 1 place left under the INVERT transform of the BINOMIAL transform of this sequence.

Original entry on oeis.org

1, 1, 3, 11, 47, 225, 1177, 6625, 39723, 251939, 1681535, 11764185, 86002177, 655305697, 5193232611, 42726002123, 364338045647, 3215471252769, 29331858429241, 276224445794785, 2682395337435723, 26832698102762435, 276221586866499839, 2923468922184615897
Offset: 0

Views

Author

Paul D. Hanna, Nov 26 2003

Keywords

Comments

The Hankel transform of this sequence is A000178(n+1); example: det([1,1,3; 1,3,11; 3,11,47]) = 12. - Philippe Deléham, Mar 02 2005
a(n) appears to be the number of indecomposable permutations (A003319) of [n+1] that avoid both of the dashed patterns 32-41 and 41-32. - David Callan, Aug 27 2014
This is true: A nonempty permutation avoids 32-41 and 41-32 if and only if all its components do so. So if A(x) denotes the g.f. for indecomposable {32-41,41-32}-avoiders, then F(x):=1/(1-A(x)) is the g.f. for all {32-41,41-32}-avoiders. From A074664, F(x)=1/x(1-1/B(x)) where B(x) is the o.g.f. for the Bell numbers. Solve for A(x). - David Callan, Jul 21 2017
The Hankel transform of this sequence without the a(0)=1 term is also A000178(n+1). - Michael Somos, Oct 02 2024

Crossrefs

Programs

  • Maple
    bintr:= proc(p) proc(n) add(p(k) *binomial(n,k), k=0..n) end end:
    invtr:= proc(p) local b;
               b:= proc(n) option remember; local i;
                    `if`(n<1, 1, add(b(n-i) *p(i-1), i=1..n+1))
                   end;
            end:
    b:= invtr(bintr(a)):
    a:= n-> `if`(n<0, 0, b(n-1)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jun 28 2012
  • Mathematica
    a[n_] := Module[{A, B}, A = 1+x; For[k=1, k <= n, k++, B = (A /. x -> x/(1 - x))/(1-x) + O[x]^n // Normal; A = 1 + x*A*B]; SeriesCoefficient[A, {x, 0, n}]]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 23 2016, adapted from PARI *)
  • PARI
    {a(n)=local(A); if(n<0,0,A=1+x+x*O(x^n); for(k=1,n,B=subst(A,x, x/(1-x))/(1-x)+x*O(x^n); A=1+x*A*B);polcoeff(A,n,x))}

Formula

G.f.: A(x) satisfies A(x) = 1/(1 - A(x/(1-x))*x/(1-x) ).
a(n) = Sum_{k = 0..n} A085838(n, k). - Philippe Deléham, Jun 04 2004
G.f.: 1/x-1-1/(B(x)-1) where B(x) = g.f. for A000110 the Bell numbers. - Vladeta Jovovic, Aug 08 2004
a(n) = Sum_{k=0..n} A094456(n,k). - Philippe Deléham, Nov 07 2007
G.f.: 1/(1-x/(1-2x/(1-x/(1-3x/(1-x/(1-4x/(1-x/(1-5x/(1-... (continued fraction). - Paul Barry, Feb 25 2010
From Sergei N. Gladkovskii, Jan 06 2012 - May 12 2013: (Start)
Continued fractions:
G.f.: 1 - x/(G(0)+x); G(k) = x - 1 + x*k + x*(x-1+x*k)/G(k+1).
G.f.: 1/x - 1/2 + (x^2-4)/(4*U(0)-2*x^2+8) where U(k) = k*(2*k+3)*x^2 + x - 2 - (2-x+2*k*x)*(2+3*x+2*k*x)*(k+1)*x^2/U(k+1).
G.f.: 1/x+1/(U(0)-1) where U(k) = -x*k + 1 - x - x^2*(k+1)/U(k+1).
G.f.: (1 - U(0))/x - 1 where U(k) = 1 - x*(k+2) - x^2*(k+1)/U(k+1).
G.f.: (1 - U(0))/x where U(k) = 1 - x*(k+1)/(1-x/U(k+1)).
G.f.: 1/x + 1/( G(0)-1) where G(k) = 1 - x/(1 - x*(2*k+1)/(1 - x/(1 - x*(2*k+2)/ G(k+1) ))).
G.f.:1/x + 1/( G(0) - 1 ) where G(k) = 1 - x/(1 - x*(k+1)/G(k+1) ).
G.f.: (1 - Q(0))/x where Q(k) = 1 + x/(x*k - 1 )/Q(k+1).
G.f.: 1/x - 1/x/Q(0), where Q(k) = 1 + x/(1 - x + x*(k+1)/(x - 1/Q(k+1))).
(End)
Conjecture: a(n) = b(2^(n-1) - 1) for n > 0 with a(0) = 1 where b(n) = b((n - 2^f(n))/2) + b(floor((2n - 2^f(n))/2)) + b(A025480(n-1)) for n > 0 with b(0) = 1 and where f(n) = A007814(n). - Mikhail Kurkov, Jan 11 2022

A125644 Table with T(n,k) = the number of Dyck paths whose ascent lengths, in order, are the k-th composition of n, for the standard composition order.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 3, 1, 2, 1, 1, 1, 4, 3, 6, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 5, 4, 10, 3, 9, 6, 10, 2, 7, 5, 9, 3, 7, 4, 5, 1, 4, 3, 6, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 6, 5, 15, 4, 14, 10, 20, 3, 12, 9, 19, 6, 16, 10, 15, 2, 9, 7, 16, 5, 14, 9, 14, 3, 10, 7, 12, 4, 9, 5, 6, 1, 5
Offset: 0

Views

Author

Keywords

Comments

The standard composition order is specified in A066099. Also, the number of ordered, rooted trees for which the out-degrees of the non-leaf nodes, in preorder, form the specified composition.

Examples

			Composition number 11 is 2,1,1; there are 3 Dyck paths with this pattern: UUDDUDUD, UUDUDDUD and UUDUDUDD, so a(11) = 3. The corresponding trees are:
      O         O
      |         |
      O  O   O  O
      |  |   |  |
  O   O  O   O  O   O
   \ /    \ /    \ /
    O      O      O
The table starts:
  1;
  1;
  1,1;
  1,2,1,1;
  1,3,2,3,1,2,1,1;
  1,4,3,6,2,5,3,4,1,3,2,3,1,2,1,1;
  ...
		

Crossrefs

Cf. A125181, A011782 (row lengths), A000108 (row sums), A066099.

Programs

  • Maple
    a:= proc(l) option remember; `if`(nops(l)<=1, 1,
          add(a(subsop(1=NULL, 2=l[2]+i, l)), i=0..l[1]-1))
        end:
    b:= proc(n, l) option remember; `if`(n=0, [a(l)],
          [seq(b(n-i, [i, l[]])[], i=1..n)])
        end:
    T:= n-> b(n, [])[]:
    seq(T(n), n=0..8);  # Alois P. Heinz, May 25 2013
  • Mathematica
    a[l_] := a[l] = If[Length[l] <= 1, 1, Sum[a[ReplacePart[l,
         {1 -> Nothing, 2 -> l[[2]]+i}]], {i, 0, l[[1]]-1}]];
    b[n_, l_] := b[n, l] = If[n == 0, {a[l]},
         Flatten @ Table[b[n - i, Join[{i}, l]], {i, 1, n}]];
    T[n_] := b[n, {}];
    T /@ Range[0, 8] // Flatten (* Jean-François Alcover, Feb 14 2021, after Alois P. Heinz *)

Formula

For a composition [b_1,...,b_m], we have a([b_1]) = 1, a([b_1,b_2,...,b_m]) = Sum_{i=0}^{b_1-1} a([b_2+i,b_3,...,b_m]).
Conjecture: a(n) = A347205(A035327(n)) for n >= 0 (noticed by Sequence Machine). - Mikhail Kurkov, Dec 15 2021

A358631 Irregular table T(n, k), n >= 0, k > 0, read by rows of extended (due to binary expansion of n) Stirling numbers of the first kind.

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 5, 1, 6, 11, 6, 1, 6, 7, 1, 12, 20, 9, 1, 18, 26, 9, 1, 24, 50, 35, 10, 1, 8, 9, 1, 18, 29, 12, 1, 30, 41, 12, 1, 48, 94, 59, 14, 1, 36, 47, 12, 1, 72, 130, 71, 14, 1, 96, 154, 71, 14, 1, 120, 274, 225, 85, 15, 1, 10, 11, 1, 24, 38, 15, 1, 42
Offset: 0

Views

Author

Mikhail Kurkov, Nov 24 2022

Keywords

Comments

Row n length is A000120(n) + 2.

Examples

			Irregular table begins:
    1,   1;
    2,   3,   1;
    4,   5,   1;
    6,  11,   6,  1;
    6,   7,   1;
   12,  20,   9,  1;
   18,  26,   9,  1;
   24,  50,  35, 10,  1;
    8,   9,   1;
   18,  29,  12,  1;
   30,  41,  12,  1;
   48,  94,  59, 14,  1;
   36,  47,  12,  1;
   72, 130,  71, 14,  1;
   96, 154,  71, 14,  1;
  120, 274, 225, 85, 15, 1;
		

Crossrefs

Programs

  • PARI
    b1(n)=if(n>0, my(A=n - 2^logint(n, 2)); if(A>0, logint(A, 2) + 1))
    b2(n)=if(n>0, my(A=b1(3*2^logint(n, 2) - n - 1)); n + if(A>0, 2^(A-1)))
    P(n,k)=if(n==0 || k==1, (n==0 && k<3) + (k==1 && n>0), my(L=logint(n, 2), A=n - 2^L); (hammingweight(A) + 2)*P(A, k-1)*(L - b1(n) + 1) + P(b2(A), k))
    T(n, k)=my(A=hammingweight(n)); if(k<=(A + 2), P(n, A - k + 3))

Formula

T(n, k) = P(n, wt(n) - k + 3) for n >= 0, 0 < k <= wt(n) + 2 where wt(n) = A000120(n).
P(n, 1) = 1 for n > 0 with P(0, 1) = P(0, 2) = 1.
P(n, k) = (A000120(q(n)) + 2)*P(q(n), k-1)*(A290255(n) + 1) + P(s(q(n)), k) for n > 0, k > 1 where q(n) = A053645(n) and where s(n) = n + [A063250(n) > 0]*2^(A063250(n) - 1).
T(2^n - 1, k) = abs(Stirling1(n+2, k)) for n >= 0, k > 0.
Conjectures: (Start)
T(n, 1) = (A000120(n) + 1)!*A347205(n) for n >= 0.
Sum_{k=1..A000120(n) + 2} T(n, k)*(-1)^k = 0 for n >= 0.
Sum_{k=0..2^n - 1} Sum_{j=1..A000120(k) + 2} T(k, j) = 2*A052852(n+1) for n >= 0.
Sum_{i=1..wt(k) + 2} m^(i-1)*T(k, i) = (wt(k) + 1)!*A347205(2^m*(2k+1)) for m >= 0, k >= 0 where wt(n) = A000120(n). (End)

Extensions

Offset corrected by Mikhail Kurkov, Nov 07 2024

A379818 a(2n+1) = a(n) for n >= 0, a(2n) = a(n) + a(n - 2^f(n)) + a(2n - 2^f(n)) + a(A025480(n-1)) for n > 0 with a(0) = 1 where f(n) = A007814(n).

Original entry on oeis.org

1, 1, 4, 1, 10, 4, 10, 1, 22, 10, 28, 4, 49, 10, 22, 1, 46, 22, 64, 10, 118, 28, 64, 4, 190, 49, 118, 10, 190, 22, 46, 1, 94, 46, 136, 22, 256, 64, 148, 10, 424, 118, 292, 28, 478, 64, 136, 4, 661, 190, 478, 49, 796, 118, 256, 10, 1177, 190, 424, 22, 661, 46
Offset: 0

Views

Author

Mikhail Kurkov, Jan 03 2025

Keywords

Crossrefs

Programs

  • PARI
    upto(n) = my(A, v1); v1 = vector(n+1, i, 0); v1[1] = 1; for(i=1, n, v1[i+1] = v1[i\2+1] + if(i%2, 0, A = 1 << valuation(i/2, 2); v1[i/2-A+1] + v1[i-A+1] + v1[i\(4*A)+1])); v1

Formula

Conjecture: a(2^m*(2k+1)) = Sum_{j=0..m} (binomial(m+2, j+1) - binomial(m, j))*a(2^j*k) for m >= 0, k >= 0 with a(0) = 1.

A363417 a(n) = Sum_{j=0..2^n - 1} b(j) for n >= 0 where b(n) = (A023416(n) + 1)*b(A053645(n)) + [A036987(n) = 0]*b(A266341(n)) for n > 0 with b(0) = 1.

Original entry on oeis.org

1, 2, 6, 23, 106, 566, 3415, 22872, 167796, 1334596, 11414192, 104270906, 1011793389, 10379989930, 112134625986, 1271209859403, 15077083642150, 186588381229340, 2403775013224000, 32168379148440968, 446341838086450308, 6410107231501731012, 95136428354649665256
Offset: 0

Views

Author

Mikhail Kurkov, Jun 11 2023 [verification needed]

Keywords

Comments

Note that [A036987(n) = 0]*b(A266341(n)) is the same as max((1 - T(n, j))*b(A053645(n) + 2^j*(1 - T(n, j))) | 0 <= j <= A000523(n)) where T(n, k) = floor(n/2^k) mod 2.
In fact b(n) is a generalization of A347205 just as A329369 is a generalization of A341392.

Crossrefs

Similar recurrences: A284005, A329369, A341392, A347205.

Programs

  • PARI
    A063250(n)=my(L=logint(n, 2), A=0); for(i=0, L, my(B=n\2^(L-i)+1); A++; A-=logint(B, 2)==valuation(B, 2)); A
    upto(n)=my(v, v1); v=vector(2^n, i, 0); v[1]=1; v1=vector(n+1, i, 0); v1[1]=1; for(i=1, #v-1, my(L=logint(i, 2), A=i - 2^L, B=A063250(i)); v[i+1]=(L - hammingweight(i) + 2)*v[A+1] + if(B>0, v[A + 2^(B-1) + 1])); for(i=1, n, v1[i+1]=v1[i] + sum(j=2^(i-1)+1, 2^i, v[j])); v1
Showing 1-7 of 7 results.