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.

Previous Showing 11-20 of 22 results. Next

A089246 Triangular array read by rows: a(n, k) is the number of ordered m-tuples of positive integers (x_1, ..., x_m) such that max x_i = n+1-m and there are k ones (0 <= k <= n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 5, 5, 3, 0, 1, 14, 15, 9, 4, 0, 1, 43, 50, 31, 14, 5, 0, 1, 144, 180, 118, 54, 20, 6, 0, 1, 523, 695, 481, 229, 85, 27, 7, 0, 1, 2048, 2869, 2081, 1035, 395, 125, 35, 8, 0, 1, 8597, 12616, 9535, 4929, 1951, 629, 175, 44, 9, 0, 1, 38486, 58862
Offset: 0

Views

Author

Alford Arnold, Dec 22 2003

Keywords

Comments

The row sums are given by A047970 because row n counts the same tuples as the n-th antidiagonal of A047969.

Examples

			a(5, 0) = 14: (5), (4,2), (2,4), (4,3), (3,4), (4,4),
(3,2,2), (2,3,2), (2,2,3), (3,3,2), (3,2,3), (2,3,3), (3,3,3), (2,2,2,2).
a(5, 1) = 15: (4,1), (1,4), (3,3,1), (3,1,3), (1,3,3), 6 permutations of (3,2,1) and 4 permutations of (2,2,2,1).
Triangle starts:
                             [0] 1
                           [1] 0, 1
                          [2] 1, 0, 1
                        [3] 2, 2, 0, 1
                       [4] 5, 5, 3, 0, 1
                    [5] 14, 15, 9, 4, 0, 1
                  [6] 43, 50, 31, 14, 5, 0, 1
              [7] 144, 180, 118, 54, 20, 6, 0, 1
            [8] 523, 695, 481, 229, 85, 27, 7, 0, 1
       [9] 2048, 2869, 2081, 1035, 395, 125, 35, 8, 0, 1
		

Crossrefs

First differences by column of A101494.

Formula

From Mathew Englander, Feb 25 2021: (Start)
T(n,k) = 0^(n-k) + Sum_{m = k..n-1} C(m,k) * ((n-m)^(m-k) - (n-1-m)^(m-k)).
T(n,k) = Sum_{j = k+1..n-1} C(j,k)*Sum_{i = j..n-1} T(i,j) for 0 <= k < n-1; T(k+1,k)=0 and T(k,k)=1 for k>=0.
G.f. of row n: 1 + Sum_{i = 1..n} (x+n-i)^(i-1)*(x+n-i-1). (End)

Extensions

Edited and extended by David Wasserman, Sep 07 2005

A105552 Irregular triangle T(n,k) read down columns: the number of compositions c of n with largest_part(c)+length(c)=k+1 in row n, column k.

Original entry on oeis.org

1, 2, 4, 1, 7, 5, 2, 11, 14, 12, 5, 1, 16, 30, 39, 32, 18, 7, 2, 22, 55, 95, 113, 101, 71, 41, 18, 6, 1, 29, 91, 195, 299, 357, 350, 292, 207, 126, 64, 27, 9, 2, 37, 140, 357, 664, 978, 1204, 1283, 1198, 992, 731, 482, 284, 148, 66, 25, 7, 1, 46, 204, 602, 1309, 2274, 3329, 4253
Offset: 1

Views

Author

Alford Arnold, May 03 2005

Keywords

Comments

For each of the A000041(n) partitions of n, one can assign a weight to the partition which counts the permutations of that partition, given by the multinomial coefficient derived from the frequency representation of the parts.
An equivalent representation is given by writing down all compositions of n.
The entries count those partitions multiplied by their weights (=compositions) of n where the sum of the largest addend plus number of parts equals k+1. Only nonzero counts are entered into the sequence.
Each entry can also be interpreted as counting a subset of numbers in A055932, because there is a 1-to-1 correspondence between their prime signature and ordered partitions.
Each diagonal of T(n,k) can be decomposed into p(n) sequences. For example,
A086602 = 2 12 39 95 195 ... is the sum of
A000330 = 1 5 14 30 55 ... plus
A001296 = 1 7 25 65 140 ...
The main diagonal and subdiagonals in order of appearance are A000124, A000330, A086602, A089574, A107600, A107601, A109125, ...

Examples

			The row n=7 starts from the partitions (weights in parentheses) 7 (1), 6+1 (2), 5+2 (2), 4+3 (2), 5+1+1 (3), 4+2+1 (6=3!/1!/1!/1!), 3+3+1 (3), 3+2+2 (3), 4+1+1+1 (4=4!/1!/3!), 3+2+1+1 (12 = 4!/1!/1!/2!), 2+2+2+1 (4), 3+1+1+1+1+1 (5), 2+2+1+1+1 (10=5!/2!/3!), 2+1+1+1+1 (6), 1+1+1+1+1+1 (1).
Then T(7,7) = 1+2+3+4+5+6+1 = 22 is the sum of the weights of partitions with largest part 7 and length 1, largest part 6 and length 2,... largest part 1 and length 7.
T(7,6) = 2+6+12+10 = 30 is the sum of the weights of the partitions with largest part 6 and length 1, largest part 5 and length 2, ..., largest part 1 and length 6.
T(7,5) = 2+3+3+4 = 12 collects all the partitions with largest part 5 and length 1 down to largest part 1 and length 5.
The array has A033638(k) nonzero entries per column, starting at n=1 as :
1
..2
....4
....1..7
.......5..11
.......2..14..16
..........12..30..22
...........5..39..55..29
...........1..32..95..91..37
..............18.113.195.140
...............7.101.299.357
...............2
		

Crossrefs

Cf. A047969, A047970, A055932, A057335, A083480, A083906, A089349, A033638, A086602 (subdiagonal), A089574 (subdiagonal).

Programs

  • Maple
    A033638 := proc(n) ( (7+(-1)^n)/2 + n^2 )/4 ; end proc:
    freq := proc(L,n) local a,p; a := 0 ; for p in L do if p = n then a := a+1 ; end if; end do: a ; end proc:
    M3 := proc(L) local a,i; a := factorial(nops(L)) ; for i in convert(L,set) do a := a/factorial(freq(L,i)) ; end do: a ; end proc:
    A105552 := proc(n,k) local p,a,l ; a := 0 ; for p in combinat[partition](n) do if max(op(p)) + nops(p) = k+1 then a := a+ M3(p); end if; end do ; a ; end proc:
    for k from 1 to 15 do for n from k to k+A033638(k)+1 do T := A105552(n,k) ; if T >0 then printf("%d,", A105552(n,k)) ; end if; end do: printf("\n") ; end do: # R. J. Mathar, Jun 26 2010
    # second Maple program:
    b:= proc(n, k, p) option remember; `if`(n=0 and k=0, 1,
         `if`(k<1, 0, add(b(n-j, k-1-max(p, j)+p, max(p, j)), j=1..n)))
        end:
    T:= k-> seq(b(n, k+1, 0), n=k..k+floor((k-1)^2/4)):
    seq(T(k), k=1..10);  # Alois P. Heinz, Jul 24 2013
  • Mathematica
    b[n_, k_, p_] := b[n, k, p] = If[n == 0 && k == 0, 1, If[k < 1, 0, Sum[b[n - j, k - 1 - Max[p, j] + p, Max[p, j]], {j, 1, n}]]]; T[k_] := Table[b[n, k + 1, 0], {n, k, k + Floor[(k - 1)^2/4]}]; Table[T[k], {k, 1, 10}] // Flatten (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

Formula

Row sums: Sum_{k=0..n} T(n,k) = 2^(n-1).
Column sums: Sum_{n>=k} T(n,k) = A047970(n).

Extensions

Definition clarified by R. J. Mathar, Jun 26 2010

A112531 Triangle read by rows which lists compositions having at least one part equal to 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 3, 1, 2, 3, 6, 4, 3, 6, 4, 1, 2, 3, 6, 4, 6, 12, 12, 5, 3, 6, 12, 10, 4, 10, 5, 1, 2, 3, 6, 4, 6, 12, 12, 5, 6, 12, 24, 20, 12, 30, 20, 6, 3, 6, 12, 10, 12, 30, 30, 15, 4, 10, 20, 20, 5, 15, 6, 1
Offset: 1

Views

Author

Alford Arnold, Sep 10 2005

Keywords

Comments

Consider partitions listed in the order given by A241596 and A242628. Omit any partition not containing 1 as a part. Write down the number of compositions (= ordered partitions) corresponding to this partition.
Row sums give A112532; which are the first differences of A047970.
Row lengths give A011782.

Examples

			The partitions (see A241596) begin 1 2 11 3 22 21 111 4 33 32 222 31 221 211 1111 ...
After omitting partitions with no part equal to 1, we have
1 11 21 111 31 221 211 1111 ...
which give rise to 1 1 2 1 2 3 3 1 ... compositions.
The resulting triangle of compositions begins:
1;
1;
2, 1;
2, 3, 3, 1;
2, 3, 6, 4, 3, 6, 4, 1;
2, 3, 6, 4, 6, 12, 12, 5, 3, 6, 12, 10, 4, 10, 5, 1;
2, 3, 6, 4, 6, 12, 12, 5, 6, 12, 24, 20, 12, 30, 20, 6, 3, 6, 12, 10, 12, 30, 30, 15, 4, 10, 20, 20, 5, 15, 6, 1;
...
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, May 19 2014 based on postings to the Sequence Fans Mailing List by Peter Luschny, Jonas Wallgren, Arie Groeneveld, and Franklin T. Adams-Watters.

A123639 Consider the 2^n compositions of n and count only those ending in an even part.

Original entry on oeis.org

0, 1, 2, 6, 18, 61, 224, 890, 3784, 17113, 81950, 414230, 2204110, 12314109, 72049548, 440379770, 2805266692, 18584809833, 127812870474, 910990458022, 6719535098378, 51223251471453, 403044829472760, 3269538955148698, 27314067026782976, 234749040898160153
Offset: 1

Views

Author

Alford Arnold, Oct 04 2006

Keywords

Comments

Compositions ending in an even part yield sequence 0 1 2 6 18 ... (this sequence). and A123638(n)+a(n) = A047970(n). Ending parity of compositions can be detected using mod(A065120,2)

Examples

			4
31 32 33
211 221 222
1111
Consider the above multisets- permute and note the parity of the ending part of each of the 14 compositions.
4
31 13 32 23 33
211 121 112 221 212 122 222
1111
4 is even
31 13 23 and 33 are odd
32 is even
etc
there are 1+1+4+0 even compositions therefore a(4)=6.
		

Crossrefs

Programs

  • Maple
    g:= proc(b,t,l,m) option remember; if t=0 then b*(1-l) else add (g(b, t-1, irem(k, 2), m), k=1..m-1) +g(1, t-1, irem(m, 2), m) fi end: a:= n-> add (g(0, k, 0, n+1-k), k=1..n): seq (a(n), n=1..30); # Alois P. Heinz, Nov 06 2009
  • Mathematica
    g[b_, t_, l_, m_] := g[b, t, l, m] = If[ t == 0 , b*(1-l), Sum[g[b, t-1, Mod[k, 2], m], {k, 1, m-1}] + g[1, t-1, Mod[m, 2], m]]; a[n_] := Sum[g[0, k, 0, n+1-k], {k, 1, n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 04 2013, translated from Alois P. Heinz's Maple program *)

Extensions

More terms from Alois P. Heinz, Nov 06 2009

A123638 Consider the 2^n compositions of n and count only those ending in an odd part with row sum A001045.

Original entry on oeis.org

1, 1, 3, 8, 25, 83, 299, 1158, 4813, 21373, 100955, 504916, 2662761, 14754311, 85643459, 519493938, 3285790317, 21628225041, 147887079907, 1048634836288, 7698589399833, 58432476430139, 457901993065915, 3700291495531166
Offset: 1

Views

Author

Alford Arnold, Oct 04 2006

Keywords

Comments

Compositions ending in an even part yield sequence 0 1 2 6 18 ... A123639. and a(n)+A123639(n) = A047970(n). Ending parity of compositions can be detected using mod(A065120,2)

Examples

			4
31 32 33
211 221 222
1111
Consider the above multisets: permute and note the parity of the ending part of each of the 14 compositions.
4
31 13 32 23 33
211 121 112 221 212 122 222
1111
4 is even
31 13 23 and 33 are odd
32 is even
etc
there are 0 + 4 + 3 + 1 = 8 odd compositions therefore a(4)=8.
		

Crossrefs

Programs

  • Maple
    g:= proc(b,t,l,m) option remember; if t=0 then b*l else add (g(b, t-1, irem(k, 2), m), k=1..m-1) +g(1, t-1, irem(m, 2), m) fi end: a:= n-> add (g(0, k, 0, n+1-k), k=1..n): seq (a(n), n=1..30);
  • Mathematica
    g[b_, t_, l_, m_] := g[b, t, l, m] = If[t == 0 , b*l , Sum[g[b, t-1, Mod[k, 2], m], {k, 1, m-1}] + g[1, t-1, Mod[m, 2], m]]; a[n_] := Sum[g[0, k, 0, n+1-k], {k, 1, n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 04 2013, translated from Alois P. Heinz's Maple program *)

Extensions

Offset corrected, Maple program and more terms added by Alois P. Heinz, Nov 06 2009

A242431 Triangle read by rows: T(n, k) = (k + 1)*T(n-1, k) + Sum_{j=k..n-1} T(n-1, j) for k < n, T(n, n) = 1. T(n, k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 14, 10, 4, 1, 43, 35, 17, 5, 1, 144, 128, 74, 26, 6, 1, 523, 491, 329, 137, 37, 7, 1, 2048, 1984, 1498, 730, 230, 50, 8, 1, 8597, 8469, 7011, 3939, 1439, 359, 65, 9, 1, 38486, 38230, 33856, 21568, 9068, 2588, 530, 82, 10, 1
Offset: 0

Views

Author

Peter Luschny, May 14 2014

Keywords

Examples

			0|    1;
1|    2,    1;
2|    5,    3,    1;
3|   14,   10,    4,   1;
4|   43,   35,   17,   5,   1;
5|  144,  128,   74,  26,   6,  1;
6|  523,  491,  329, 137,  37,  7, 1;
7| 2048, 1984, 1498, 730, 230, 50, 8, 1;
		

Crossrefs

Programs

  • Maple
    T := proc(n, k) option remember; local j;
        if k=n then 1
      elif k>n then 0
      else (k+1)*T(n-1, k) + add(T(n-1, j), j=k..n)
        fi end:
    seq(print(seq(T(n,k), k=0..n)), n=0..7);
  • Sage
    def A242431_rows():
        T = []; n = 0
        while True:
            T.append(1)
            yield T
            for k in (0..n):
                T[k] = (k+1)*T[k] + add(T[j] for j in (k..n))
            n += 1
    a = A242431_rows()
    for n in range(8): next(a)

Formula

T(n, 0) = A047970(n).
Sum_{k=0..n} T(n, k) = A112532(n+1).
From Mathew Englander, Feb 25 2021: (Start)
T(n,k) = 1 + Sum_{i = k+1..n} i*(i+1)^(n-i).
T(n,k) = T(n,k+1) + (k+1)*(k+2)^(n-k-1) for 0 <= k < n.
T(n,k) = T(n,k+1) + (k+2)*(T(n-1,k) - T(n-1,k+1)) for 0 <= k <= n-2.
T(n,k) = Sum_{i = 0..n-k} (k+2)^i*A089246(n-k,i).
Sum_{i = k..n} T(i,k) = Sum_{i = 0..n-k} (n+2-i)^i = Sum_{i = 0..n-k} A101494(n-k,i)*(k+2)^i. (End)

A343237 Triangle T obtained from the array A(n, k) = (k+1)^(n+1) - k^(n+1), n, k >= 0, by reading antidiagonals upwards.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 5, 1, 1, 15, 19, 7, 1, 1, 31, 65, 37, 9, 1, 1, 63, 211, 175, 61, 11, 1, 1, 127, 665, 781, 369, 91, 13, 1, 1, 255, 2059, 3367, 2101, 671, 127, 15, 1, 1, 511, 6305, 14197, 11529, 4651, 1105, 169, 17, 1
Offset: 0

Views

Author

Wolfdieter Lang, May 10 2021

Keywords

Comments

This is the row reversed version of the triangle A047969(n, m). The corresponding array A047969 is a(n, k) = A(k, n) (transposed of array A).
A(n-1, k-1) = k^n - (k-1)^n gives the number of n-digit numbers with digits from K = {1, 2, 3, ..., k} such that any digit from K, say k, appears at least once. Motivated by a comment in A005061 by Enrique Navarrete, the instance k=4 for n >= 1 (the column 3 in array A), and the d = 3 (sub)-diagonal sequence of T for m >= 0.

Examples

			The array A begins:
n\k  0  1   2    3     4     5     6      7      8      9 ...
-------------------------------------------------------------
0:   1  1   1    1     1     1     1      1      1      1 ...
1:   1  3   5    7     9    11    13     15     17     19 ...
2:   1  7  19   37    61    91   127    169    217    271 ...
3:   1 15  65  175   369   671  1105   1695   2465   3439 ...
4:   1 31 211  781  2101  4651  9031  15961  26281  40951 ...
5:   1 63 665 3367 11529 31031 70993 144495 269297 468559 ...
...
The triangle T begins:
n\m   0    1     2     3     4     5    6    7   8  9 10 ...
-------------------------------------------------------------
0:    1
1:    1    1
2:    1    3     1
3:    1    7     5     1
4:    1   15    19     7     1
5:    1   31    65    37     9     1
6:    1   63   211   175    61    11    1
7:    1  127   665   781   369    91   13    1
8:    1  255  2059  3367  2101   671  127   15   1
9:    1  511  6305 14197 11529  4651 1105  169  17  1
10:   1 1023 19171 58975 61741 31031 9031 1695 217 19  1
...
Combinatorial interpretation (cf. A005061 by _Enrique Navarrete_)
The three digits numbers with digits from K ={1, 2, 3, 4} having at least one 4 are:
j=1 (one 4): 114, 141, 411; 224, 242, 422; 334, 343, 433; 124, 214, 142, 241, 412, 421; 134, 314, 143, 341, 413, 431; 234, 243, 423. That is,  3*3 + 3!*3 = 27 = binomial(3, 1)*(4-1)^(3-1) = 3*3^2;
j=2 (twice 4):  144, 414, 441;  244, 424, 442;  344, 434, 443; 3*3 = 9 = binomial(3, 2)*(4-1)^(3-2) = 3*3;
j=3 (thrice 4) 444; 1 = binomial(3, 3)*(4-1)^(3-3).
Together: 27 + 9 + 1 = 37 = A(2, 3) = T(5, 3).
		

Crossrefs

Cf. A005061, A008292, A047969 (reversed), A045531 (central diagonal), A047970 (row sums of triangle).
Row sequences of array A (nexus numbers): A000012, A005408, A003215, A005917(k+1), A022521, A022522, A022523, A022524, A022525, A022526, A022527, A022528.
Column sequences of array A: A000012, A000225(n+1), A001047(n+1), A005061(n+1), A005060(n+1), A005062(n+1), A016169(n+1), A016177(n+1), A016185(n+1), A016189(n+1), A016195(n+1), A016197(n+1).

Programs

  • Maple
    egf := exp(exp(x)*y + x)*(exp(x)*y - y + 1): ser := series(egf, x, 12):
    cx := n -> series(n!*coeff(ser, x, n), y, 12):
    Arow := n -> seq(k!*coeff(cx(n), y, k), k=0..9):
    for n from 0 to 5 do Arow(n) od; # Peter Luschny, May 10 2021
  • Mathematica
    A[n_, k_] := (k + 1)^(n + 1) - k^(n + 1); Table[A[n - k, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, May 10 2021 *)

Formula

Array A(n, k) = (k+1)^(n+1) - k^(n+1), n, k >= 0.
A(n-1, k-1) = Sum_{j=1} binomial(n, j)*(k-1)^(n-j) = Sum_{j=0} binomial(n, j)*(k-1)^(n-j) - (k-1)^n = (1+(k-1))^n - (k-1)^n = k^n - (k-1)^n (from the combinatorial comment on A(n-1, k-1) above).
O.g.f. row n of array A: RA(n, x) = P(n, x)/(1 - x)^n, with P(n, x) = Sum_{m=0..n} A008292(n+1, m+1)*x^m, (the Eulerian number triangle A008292 has offset 1) for n >= 0. (See the Oct 26 2008 comment in A047969 by Peter Bala). RA(n, x) = polylog(-(n+1), x)*(1-x)/x. (For P(n, x) see the formula by Vladeta Jovovic, Sep 02 2002.)
E.g.f. of e.g.f.s of the rows of array A: EE(x, y) = exp(x)*(1 + y*(exp(x) - 1))*exp(y*exp(x)), that is A(n, k) = [y^k/k!][x^n/n!] EE(x, y).
Triangle T(n, m) = A(n-m, m) = (m+1)^(n-m+1) - m^(n-m+1), n >= 0, m = 0, 1, ..., n.
E.g.f.: -(exp(x)-1)/(x*exp(x)*y-x). - Vladimir Kruchinin, Nov 02 2022

A346660 Number of cyclic patterns of length n that avoid the vincular pattern 23-1-4.

Original entry on oeis.org

1, 1, 1, 2, 5, 14, 42, 133, 442, 1537, 5583, 21165, 83707, 345324, 1485687, 6663354, 31134078, 151408319, 765462514, 4017644518, 21860398111, 123120413119, 716701884408, 4305828784896, 26661920519485, 169937265101628, 1113616036893636, 7494786443901137
Offset: 0

Views

Author

Rupert Li, Aug 03 2021

Keywords

Comments

The vincular pattern 23-1-4 requires the 2 and the 3 to be adjacent.
By the trivial Wilf equivalence obtained by reversing the permutations, a(n) is also the number of cyclic patterns of length n that avoid the vincular pattern 32-4-1.

Crossrefs

Formula

For n >= 2, a(n) = Sum_{i=0..n-2} binomial(n-2,i) * A092920(i).

A110554 Column 11 of table A105552.

Original entry on oeis.org

56, 285, 954, 2366, 4711, 7936, 11712, 15448, 18450, 20155, 20329, 19078, 16746, 13780, 10644, 7712, 5235, 3325, 1970, 1081, 544, 247, 99, 33, 8, 1
Offset: 1

Views

Author

Alford Arnold, Jul 30 2005

Keywords

Comments

A105552 is constructed by summing values from ordered Gaussian polynomials, therefore the present begins with one value each from the following diagonal sequences and sums to A047970(11).

Examples

			a(6) = A107601(6) = 7936.
		

Crossrefs

A124220 Transpose table A123685 then subtract, term by term, from table A047969.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 1, 1, 4, 0, 0, 5, 5, 8, 0, 1, 2, 23, 19, 16, 0, 0, 8, 18, 101, 65, 32, 0, 1, 3, 58, 110, 431, 211, 64, 0
Offset: 1

Views

Author

Alford Arnold, Oct 29 2006

Keywords

Examples

			Row six of A047969 is 1 9 37 65 31 1
Row six of A123685^T is 0 7 14 46 15 1
so row six of a(n) is 1 2 23 19 16 0
		

Crossrefs

The sequence of row sums is 0 1 2 6 18 61 224 ... = A123639. The sequence of row sums for table A123685 is 1 1 3 8 25 83 299 ... = A123638. The sequence of row sums for table A047969 is 1 2 5 14 43 144 523 ... = A047970

Formula

A124220(n) = A047969(n) - Trn(A123685).
Previous Showing 11-20 of 22 results. Next