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.

A049085 Irregular table T(n,k) = maximal part of the k-th partition of n, when listed in Abramowitz-Stegun order (as in A036043).

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 1, 4, 3, 2, 2, 1, 5, 4, 3, 3, 2, 2, 1, 6, 5, 4, 3, 4, 3, 2, 3, 2, 2, 1, 7, 6, 5, 4, 5, 4, 3, 3, 4, 3, 2, 3, 2, 2, 1, 8, 7, 6, 5, 4, 6, 5, 4, 4, 3, 5, 4, 3, 3, 2, 4, 3, 2, 3, 2, 2, 1, 9, 8, 7, 6, 5, 7, 6, 5, 4, 5, 4, 3, 6, 5, 4, 4, 3, 3, 5, 4, 3, 3, 2, 4, 3, 2, 3, 2, 2, 1, 10, 9, 8, 7, 6, 5, 8, 7, 6
Offset: 0

Views

Author

Keywords

Comments

a(0) = 0 by convention. - Franklin T. Adams-Watters, Jun 24 2014
Like A036043 this is important for calculating sequences defined over the numeric partitions, cf. A000041. For example, the triangular array A019575 can be calculated using A036042 and this sequence.
The row sums are A006128. - Johannes W. Meijer, Jun 21 2010
The name is correct if the partitions are read in reverse, so that the parts are weakly increasing. The version for non-reversed partitions is A334441. - Gus Wiseman, May 21 2020

Examples

			Rows:
  [0];
  [1];
  [2,1];
  [3,2,1];
  [4,3,2,2,1];
  [5,4,3,3,2,2,1];
  ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 831.

Crossrefs

Row lengths are A000041.
Row sums are A006128.
The length of the partition is A036043.
The number of distinct elements of the partition is A103921.
The Heinz number of the partition is A185974.
The version ignoring length is A194546.
The version for non-reversed partitions is A334441.
Lexicographically ordered reversed partitions are A026791.
Reversed partitions in Abramowitz-Stegun order are A036036.
Reverse-lexicographically ordered partitions are A080577.
Partitions in Abramowitz-Stegun order are A334301.

Programs

  • Maple
    with(combinat):
    nmax:=9:
    for n from 1 to nmax do
       y(n):=numbpart(n):
       P(n):=partition(n):
       for k from 1 to y(n) do
          B(k):=P(n)[k]
       od:
       for k from 1 to y(n) do
          s:=0: j:=0:
          while sJohannes W. Meijer, Jun 21 2010
  • Mathematica
    Table[If[n==0,{0},Max/@Sort[Reverse/@IntegerPartitions[n]]],{n,0,8}] (* Gus Wiseman, May 21 2020 *)
  • PARI
    A049085(n,k)=if(n,partitions(n)[k][1],0) \\ M. F. Hasler, Jun 06 2018

Extensions

More terms from Wolfdieter Lang, Apr 28 2005
a(0) inserted by Franklin T. Adams-Watters, Jun 24 2014

A049009 Number of functions from a set to itself such that the sizes of the preimages of the individual elements in the range form the n-th partition in Abramowitz and Stegun order.

Original entry on oeis.org

1, 1, 2, 2, 3, 18, 6, 4, 48, 36, 144, 24, 5, 100, 200, 600, 900, 1200, 120, 6, 180, 450, 300, 1800, 7200, 1800, 7200, 16200, 10800, 720, 7, 294, 882, 1470, 4410, 22050, 14700, 22050, 29400, 176400, 88200, 88200, 264600, 105840, 5040, 8, 448, 1568, 3136, 1960
Offset: 0

Views

Author

Keywords

Comments

a(n,k) is a refinement of 1; 2,2; 3,18,6; 4,84,144,24; ... cf. A019575.
a(n,k)/A036040(n,k) and a(n,k)/A048996(n,k) are also integer sequences.
Apparently a(n,k)/A036040(n,k) = A178888(n,k). - R. J. Mathar, Apr 17 2011
Let f,g be functions from [n] into [n]. Let S_n be the symmetric group on n letters. Then f and g form the same partition iff S_nfS_n = S_ngS_n. - Geoffrey Critzer, Jan 13 2022

Examples

			Table begins:
  1;
  1;
  2,  2;
  3, 18,  6;
  4, 48, 36, 144, 24;
  ...
For n = 4, partition [3], we can map all three of {1,2,3} to any one of them, for 3 possible values. For n=5, partition [2,1], there are 3 choices for which element is alone in a preimage, 3 choices for which element to map that to and then 2 choices for which element to map the pair to, so a(5) = 3*3*2 = 18.
		

References

  • O. Ganyushkin and V. Mazorchuk, Classical Finite Transformation Semigroups, Springer, 2009, page38.

Crossrefs

Programs

  • Mathematica
    f[list_] := Multinomial @@ Join[{nn - Length[list]}, Table[Count[list, i], {i, 1, nn}]]*Multinomial @@ list; Table[nn = n; Map[f, IntegerPartitions[nn]], {n, 0, 10}] // Grid (* Geoffrey Critzer, Jan 13 2022 *)
  • PARI
    C(sig)={my(S=Set(sig)); (binomial(vecsum(sig), #sig)) * (#sig)! * vecsum(sig)! / (prod(k=1, #S, (#select(t->t==S[k], sig))!) * prod(k=1, #sig, sig[k]!))}
    Row(n)={apply(C, [Vecrev(p) | p<-partitions(n)])}
    { for(n=0, 7, print(Row(n))) } \\ Andrew Howroyd, Oct 18 2020

Formula

a(n,k) = A036038(n,k) * A035206(n,k).

Extensions

Better definition from Franklin T. Adams-Watters, May 30 2006
a(0)=1 prepended by Andrew Howroyd, Oct 18 2020

A306800 Square array whose entry A(n,k) is the number of endofunctions on a set of size n with preimage constraint {0,1,...,k}, for n >= 0, k >= 0, read by descending antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 6, 0, 1, 1, 4, 24, 24, 0, 1, 1, 4, 27, 204, 120, 0, 1, 1, 4, 27, 252, 2220, 720, 0, 1, 1, 4, 27, 256, 3020, 29520, 5040, 0, 1, 1, 4, 27, 256, 3120, 44220, 463680, 40320, 0, 1, 1, 4, 27, 256, 3125, 46470, 765030, 8401680, 362880, 0
Offset: 0

Views

Author

Benjamin Otto, Mar 10 2019

Keywords

Comments

A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
Thus, A(n,k) is the number of endofunctions on a set of size n such that each preimage has at most k entries. Equivalently, A(n,k) is the number of n-letter words from an n-letter alphabet such that no letter appears more than k times.

Examples

			Array begins:
  1    1     1     1     1 ...
  0    1     1     1     1 ...
  0    2     4     4     4 ...
  0    6    24    27    27 ...
  0   24   204   252   256 ...
  0  120  2220  3020  3120 ...
  0  720 29520 44220 46470 ...
  ...
		

Crossrefs

A(n,n) gives A000312.
Similar array for preimage condition {i>=0 | i!=k}: A245413.
Number of functions with preimage condition given by the even nonnegative integers: A209289.
Sum over all k of the number of functions with preimage condition {0,k}: A231812.
Cf. A019575.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1, k)*binomial(n, j), j=0..min(k, n))))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Apr 05 2019
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0 && i==0, 1, If[i<1, 0, Sum[b[n-j, i-1, k] Binomial[n, j], {j, 0, Min[k, n]}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 29 2019, after Alois P. Heinz *)
  • Python
    # print first num_entries entries in column k
    import math, sympy; x=sympy.symbols('x')
    k=5; num_entries = 64
    P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
    for term in range(1,num_entries):
       curr_pow=(curr_pow*eP).expand()
       r.append(curr_pow.coeff(x**term)*math.factorial(term))
    print(r)

Formula

A(n,k) = n! * [x^n] e_k(x)^n, where e_k(x) is the truncated exponential 1 + x + x^2/2! + ... + x^k/k!. When k>1, the link above yields explicit constants c_k, r_k so that the columns are asymptotically c_k * n^(-1/2) * r_k^-n. Stirling's approximation gives column k=1, and column k=0 is 0.
A(n,k) = Sum_{j=1..min(k,n)} A019575(n,j) for n>=1. - Alois P. Heinz, Jun 28 2023

Extensions

Offset changed to 0 by Alois P. Heinz, Jun 28 2023

A019576 Place n distinguishable balls in n boxes (in n^n ways); let f(n,k) = number of ways that max in any box is k, for 1<=k<=n; sequence gives triangle of numbers f(n,k)/n.

Original entry on oeis.org

1, 1, 1, 2, 6, 1, 6, 45, 12, 1, 24, 420, 160, 20, 1, 120, 4800, 2450, 375, 30, 1, 720, 65520, 43050, 7560, 756, 42, 1, 5040, 1045170, 858480, 167825, 19208, 1372, 56, 1, 40320, 19126800, 19208000, 4110120, 516096, 43008, 2304, 72, 1
Offset: 1

Views

Author

Lee Corbin (lcorbin(AT)tsoft.com)

Keywords

Comments

T(n,k) is 1/n times the number of endofunctions on [n] such that the maximal cardinality of the nonempty preimages equals k. - Alois P. Heinz, May 23 2016

Examples

			:   1;
:   1,     1;
:   2,     6,     1;
:   6,    45,    12,    1;
:  24,   420,   160,   20,   1;
: 120,  4800,  2450,  375,  30,  1;
: 720, 65520, 43050, 7560, 756, 42, 1;
		

Crossrefs

Row sums give A000169.
Cf. A019575.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1, k)/j!, j=0..min(k, n))))
        end:
    T:= (n, k)-> (n-1)!* (b(n$2, k) -b(n$2, k-1)):
    seq(seq(T(n,k), k=1..n), n=1..12);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, Sum[b[n-j, i-1, k]/j!, {j, 0, Min[k, n]}]]]; T[n_, k_] := (n-1)!*(b[n, n, k]-b[n, n, k-1]); Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jan 15 2015, after Alois P. Heinz *)

Formula

T(n,k) = A019575(n,k)/n.

A245687 Number T(n,k) of endofunctions on [n] such that the minimal cardinality of the nonempty preimages equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 24, 0, 3, 0, 216, 36, 0, 4, 0, 2920, 200, 0, 0, 5, 0, 44100, 2250, 300, 0, 0, 6, 0, 799134, 22932, 1470, 0, 0, 0, 7, 0, 16429504, 342608, 3136, 1960, 0, 0, 0, 8, 0, 382625856, 4638384, 147168, 9072, 0, 0, 0, 0, 9, 0, 9918836100, 79610850, 1522800, 18900, 11340, 0, 0, 0, 0, 10
Offset: 0

Views

Author

Alois P. Heinz, Jul 29 2014

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			Triangle T(n,k) begins:
  1;
  0,        1;
  0,        2,      2;
  0,       24,      0,    3;
  0,      216,     36,    0,    4;
  0,     2920,    200,    0,    0,  5;
  0,    44100,   2250,  300,    0,  0,  6;
  0,   799134,  22932, 1470,    0,  0,  0,  7;
  0, 16429504, 342608, 3136, 1960,  0,  0,  0,  8;
  ...
		

Crossrefs

T(n,1) = n*A241581(n) for n>0.
Rows sums give A000312.
Main diagonal gives A028310.
T(2n,n) gives A273325.
Cf. A019575 (the same for maximal cardinality).

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +add(b(n-j, i-1, k)/j!, j=k..n)))
        end:
    T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), `if`(k=n, n,
        `if`(k>=(n+1)/2, 0, n!*(b(n$2, k)-b(n$2, k+1))))):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, b[n, i-1, k] + Sum[b[n-j, i-1, k]/j!, {j, k, n}]]]; T[n_, k_] := If[k == 0, If[n == 0, 1, 0], If[k == n, n, If[k >= (n+1)/2, 0, n!*(b[n, n, k] - b[n, n, k+1])]]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 02 2015, after Alois P. Heinz *)

A035796 Words over signatures (derived from multisets and multinomials).

Original entry on oeis.org

1, 1, 2, 2, 3, 18, 4, 48, 6, 5, 36, 100, 144, 6, 200, 180, 600, 7, 450, 900, 294, 24, 300, 1800, 8, 882, 7200, 448, 1200, 1470, 4410, 9, 1568, 22050, 648, 7200, 3136, 1800, 9408, 10, 14700, 2592, 16200, 1960, 56448, 900, 29400, 6048, 22050, 18144
Offset: 1

Views

Author

Keywords

Comments

A reordering of A049009(n)=A049009(p(n)): distribution of words by numeric partition where the partition sequence: p(n)=[1],[2],[1,1],[3],[2,1],[1,1,1],[4],[3,1],[2,2],[2,1,1],... (A036036) is encoded by prime factorization ([P1,P2,P3,...] with P1 >= P2 >= P3 >= ... is encoded as 2^P1 * 3^P2 * 5^P3 *...): ep(n)=2,4,6,8,12,30,16,24,36,60, ... (A036035(n)) and then sorted: s(m)=2,4,6,8,12,16,24,30,32,36,48,60,... (A025487(m)). Hence A035796(n) = A049009(s(m)).

Examples

			27 = a(5) + a(6) + a(9) since a8(4) = 3, a12(5) = 18, a30(8) = 6; 256 = a(7) + a(8) + a(11) + a(13) + a(22) = 4 + 48 + 36 + 144 + 24
27 = a(5) + a(6) + a(9) = A049009(4) + A049009(5) + A049009(6) = 3 + 18 + 6 since A036035(4) = 8 = A025487(4+1), A036035(5) = 12 = A025487(5+1), A036035(6) = 30 = A025487(8+1);...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 831.

Crossrefs

Programs

  • PARI
    \\ here P is A025487 as vector and C is A049009 by partition.
    GenS(lim)={my(L=List(), S=[1]); forprime(p=2, oo, listput(L, S); my(pp=vector(logint(lim, p), i, p^i)); S=concat([k*pp[1..min(if(k>1, my(f=factor(k)[, 2]); f[#f], oo), logint(lim\k, p))] | k<-S]); if(!#S, return(Set(concat(L)))) )}
    P(n)={my(lim=1, v=[1]); while(#vt==S[k], sig))!) * prod(k=1, #sig, sig[k]!))}
    seq(n)={[C(factor(t)[,2]) | t<-P(n)]} \\ Andrew Howroyd, Oct 18 2020

Formula

a(n) = A049009(p) where p is such that A036035(p) = A025487(n). [Corrected by Andrew Howroyd and Sean A. Irvine, Oct 18 2020]

Extensions

More terms and additional comments from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jul 02 2001
a(1)=1 inserted by Andrew Howroyd and Sean A. Irvine, Oct 18 2020

A019581 Place n distinguishable balls in n boxes (in n^n ways); let f(n,k) = number of ways that max in any box is k, for 1<=k<=n; sequence gives f(n,2).

Original entry on oeis.org

0, 2, 18, 180, 2100, 28800, 458640, 8361360, 172141200, 3954484800, 100330876800, 2786980996800, 84133667217600, 2742770705875200, 96032990237184000, 3594185336405664000, 143193231131382432000, 6050494745192177280000, 270263142944131873536000
Offset: 1

Views

Author

Lee Corbin (lcorbin(AT)tsoft.com), N. J. A. Sloane

Keywords

Crossrefs

Cf. A019576.
Column k=2 of A019575. - Alois P. Heinz, Jul 29 2014

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-j, i-1)/j!, j=0..min(2, n))))
        end:
    a:= n-> n! *(b(n$2) -1):
    seq(a(n), n=1..30);  # Alois P. Heinz, Jul 29 2014
  • Mathematica
    a[n_] := n! (Hypergeometric2F1[1/2 - n/2, -n/2, 1, 2] - 1); Array[a, 30] (* Jean-François Alcover, Feb 18 2016 *)
  • PARI
    a(n) = sum(d=1, n\2, n!^2 / (2^d * (n-2*d)! * d!^2)); \\ Michel Marcus, Aug 13 2013

Formula

a(n) = sum(d=1..floor(n/2), n!^2 / ( 2^d * (n-2*d)! * d! * d! ) ).
Showing 1-7 of 7 results.