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-10 of 17 results. Next

A067538 Number of partitions of n in which the number of parts divides n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 11, 9, 14, 2, 46, 2, 24, 51, 66, 2, 126, 2, 202, 144, 69, 2, 632, 194, 116, 381, 756, 2, 1707, 2, 1417, 956, 316, 2043, 5295, 2, 511, 2293, 9151, 2, 10278, 2, 8409, 14671, 1280, 2, 36901, 8035, 21524, 11614, 25639, 2, 53138, 39810, 85004
Offset: 1

Views

Author

Naohiro Nomoto, Jan 27 2002

Keywords

Comments

Also sum of p(n,d) over the divisors d of n, where p(n,m) is the count of partitions of n in exactly m parts. - Wouter Meeussen, Jun 07 2009
From Gus Wiseman, Sep 24 2019: (Start)
Also the number of integer partitions of n whose maximum part divides n. The Heinz numbers of these partitions are given by A326836. For example, the a(1) = 1 through a(8) = 11 partitions are:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (11111) (33) (1111111) (44)
(211) (222) (422)
(1111) (321) (431)
(2211) (2222)
(3111) (4211)
(21111) (22211)
(111111) (41111)
(221111)
(2111111)
(11111111)
(End)

Examples

			a(3)=2 because 3 is a prime; a(4)=4 because the five partitions of 4 are {4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}, and the number of parts in each of them divides 4 except for {2, 1, 1}.
From _Gus Wiseman_, Sep 24 2019: (Start)
The a(1) = 1 through a(8) = 11 partitions whose length divides their sum are the following. The Heinz numbers of these partitions are given by A316413.
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (11111)  (33)      (1111111)  (44)
                    (31)             (42)                 (53)
                    (1111)           (51)                 (62)
                                     (222)                (71)
                                     (321)                (2222)
                                     (411)                (3221)
                                     (111111)             (3311)
                                                          (4211)
                                                          (5111)
                                                          (11111111)
(End)
		

Crossrefs

The strict case is A102627.
Partitions with integer geometric mean are A067539.

Programs

  • Mathematica
    Do[p = IntegerPartitions[n]; l = Length[p]; c = 0; k = 1; While[k < l + 1, If[ IntegerQ[ n/Length[ p[[k]] ]], c++ ]; k++ ]; Print[c], {n, 1, 57}, All]
    p[n_,k_]:=p[n,k]=p[n-1,k-1]+p[n-k,k];p[n_,k_]:=0/;k>n;p[n_,n_]:=1;p[n_,0]:=0
    Table[Plus @@ (p[n,# ]&/ @ Divisors[n]),{n,36}] (* Wouter Meeussen, Jun 07 2009 *)
    Table[Count[IntegerPartitions[n], q_ /; IntegerQ[Mean[q]]], {n, 50}]  (*Clark Kimberling, Apr 23 2019 *)
  • PARI
    a(n) = {my(nb = 0); forpart(p=n, if ((vecsum(Vec(p)) % #p) == 0, nb++);); nb;} \\ Michel Marcus, Jul 03 2018
    
  • Python
    # uses A008284_T
    from sympy import divisors
    def A067538(n): return sum(A008284_T(n,d) for d in divisors(n,generator=True)) # Chai Wah Wu, Sep 21 2023

Formula

a(p) = 2 for all primes p.

Extensions

Extended by Robert G. Wilson v, Oct 16 2002

A000598 Number of rooted ternary trees with n nodes; number of n-carbon alkyl radicals C(n)H(2n+1) ignoring stereoisomers.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 17, 39, 89, 211, 507, 1238, 3057, 7639, 19241, 48865, 124906, 321198, 830219, 2156010, 5622109, 14715813, 38649152, 101821927, 269010485, 712566567, 1891993344, 5034704828, 13425117806, 35866550869, 95991365288, 257332864506, 690928354105
Offset: 0

Views

Author

Keywords

Comments

Number of unlabeled rooted trees in which each node has out-degree <= 3.
Ignoring stereoisomers means that the children of a node are unordered. They can be permuted in any way and it is still the same tree. See A000625 for the analogous sequence with stereoisomers counted.
In alkanes every carbon has valence exactly 4 and every hydrogen has valence exactly 1. But the trees considered here are just the carbon "skeletons" (with all the hydrogen atoms stripped off) so now each carbon bonds to 1 to 4 other carbons. The out-degree is then <= 3.
Other descriptions of this sequence: quartic planted trees with n nodes; ternary rooted trees with n nodes and height at most 3.
The number of aliphatic amino acids with n carbon atoms in the side chain, and no rings or double bonds, has the same growth as this sequence. - Konrad Gruetzmann, Aug 13 2012

Examples

			From _Joerg Arndt_, Feb 25 2017: (Start)
The a(5) = 8 rooted trees with 5 nodes and out-degrees <= 3 are:
:         level sequence    out-degrees (dots for zeros)
:     1:  [ 0 1 2 3 4 ]    [ 1 1 1 1 . ]
:  O--o--o--o--o
:
:     2:  [ 0 1 2 3 3 ]    [ 1 1 2 . . ]
:  O--o--o--o
:        .--o
:
:     3:  [ 0 1 2 3 2 ]    [ 1 2 1 . . ]
:  O--o--o--o
:     .--o
:
:     4:  [ 0 1 2 3 1 ]    [ 2 1 1 . . ]
:  O--o--o--o
:  .--o
:
:     5:  [ 0 1 2 2 2 ]    [ 1 3 . . . ]
:  O--o--o
:     .--o
:     .--o
:
:     6:  [ 0 1 2 2 1 ]    [ 2 2 . . . ]
:  O--o--o
:     .--o
:  .--o
:
:     7:  [ 0 1 2 1 2 ]    [ 2 1 . 1 . ]
:  O--o--o
:  .--o--o
:
:     8:  [ 0 1 2 1 1 ]    [ 3 1 . . . ]
:  O--o--o
:  .--o
:  .--o
(End)
		

References

  • N. L. Biggs et al., Graph Theory 1736-1936, Oxford, 1976, p. 62 (quoting Cayley, who is wrong).
  • A. Cayley, On the mathematical theory of isomers, Phil. Mag. vol. 67 (1874), 444-447 (a(6) is wrong).
  • J. L. Faulon, D. Visco and D. Roe, Enumerating Molecules, In: Reviews in Computational Chemistry Vol. 21, Ed. K. Lipkowitz, Wiley-VCH, 2005.
  • R. A. Fisher, Contributions to Mathematical Statistics, Wiley, 1950, 41.397.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 529.
  • Handbook of Combinatorics, North-Holland '95, p. 1963.
  • Knop, Mueller, Szymanski and Trinajstich, Computer generation of certain classes of molecules.
  • D. Perry, The number of structural isomers ..., J. Amer. Chem. Soc. 54 (1932), 2918-2920.
  • G. Polya, Mathematical and Plausible Reasoning, Vol. 1 Prob. 4 pp. 85; 233.
  • 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).

Crossrefs

Programs

  • Maple
    N := 45; G000598 := 0: i := 0: while i<(N+1) do G000598 := series(1+z*(G000598^3/6+subs(z=z^2,G000598)*G000598/2+subs(z=z^3,G000598)/3)+O(z^(N+1)),z,N+1): t[ i ] := G000598: i := i+1: od: A000598 := n->coeff(G000598,z,n);
    # Another Maple program for g.f. G000598:
    G000598 := 1; f := proc(n) global G000598; coeff(series(1+(1/6)*x*(G000598^3+3*G000598*subs(x=x^2,G000598)+2*subs(x=x^3,G000598)),x, n+1),x,n); end; for n from 1 to 50 do G000598 := series(G000598+f(n)*x^n,x,n+1); od; G000598;
    spec := [S, {Z=Atom, S=Union(Z, Prod(Z, Set(S, card=3)))}, unlabeled]: [seq(combstruct[count](spec, size=n), n=0..20)];
  • Mathematica
    m = 45; Clear[f]; f[1, x_] := 1+x; f[n_, x_] := f[n, x] = Expand[1+x*(f[n-1, x]^3/6 + f[n-1, x^2]*f[n-1, x]/2 + f[n-1, x^3]/3)][[1 ;; n]]; Do[f[n, x], {n, 2, m}]; CoefficientList[f[m, x], x]
    (* second program (after N. J. A. Sloane): *)
    m = 45; gf[] = 0; Do[gf[z] = 1 + z*(gf[z]^3/6 + gf[z^2]*gf[z]/2 + gf[z^3]/3) + O[z]^m // Normal, m]; CoefficientList[gf[z], z]  (* Jean-François Alcover, Sep 23 2014, updated Jan 11 2018 *)
    b[0, i_, t_, k_] = 1; m = 3; (* m = maximum children *)
    b[n_,i_,t_,k_]:= b[n,i,t,k]= If[i<1,0,
      Sum[Binomial[b[i-1, i-1, k, k] + j-1, j]*
      b[n-i*j, i-1, t-j, k], {j, 0, Min[t, n/i]}]];
    Join[{1},Table[b[n-1, n-1, m, m], {n, 1, 35}]] (* Robert A. Russell, Dec 27 2022 *)
  • PARI
    seq(n)={my(g=O(x)); for(n=1, n, g = 1 + x*(g^3/6 + subst(g,x,x^2)*g/2 + subst(g,x,x^3)/3) + O(x^n)); Vec(g)} \\ Andrew Howroyd, May 22 2018
    
  • SageMath
    def seq(n):
        B = PolynomialRing(QQ, 't', n+1);t = B.gens()
        R. = B[[]]
        T = sum([t[i] * z^i for i in range(1,n+1)]) + O(z^(n+1))
        lhs, rhs = T, 1 + z/6 * (T(z)^3 + 3*T(z)*T(z^2) + 2*T(z^3))
        I = B.ideal([lhs.coefficients()[i] - rhs.coefficients()[i] for i in range(n)])
        return [I.reduce(t[i]) for i in range(1,n+1)]
    seq(33) # Chris Grossack, Mar 31 2025

Formula

G.f. A(x) satisfies A(x) = 1 + (1/6)*x*(A(x)^3 + 3*A(x)*A(x^2) + 2*A(x^3)).
a(n) ~ c * d^n / n^(3/2), where d = 1/A261340 = 2.8154600331761507465266167782426995425365065396907..., c = 0.517875906458893536993162356992854345458168348098... . - Vaclav Kotesovec, Aug 15 2015

Extensions

Additional comments from Steve Strand (snstrand(AT)comcast.net), Aug 20 2003

A055277 Triangle T(n,k) of number of rooted trees with n nodes and k leaves, 1 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 6, 8, 4, 1, 0, 1, 9, 18, 14, 5, 1, 0, 1, 12, 35, 39, 21, 6, 1, 0, 1, 16, 62, 97, 72, 30, 7, 1, 0, 1, 20, 103, 212, 214, 120, 40, 8, 1, 0, 1, 25, 161, 429, 563, 416, 185, 52, 9, 1, 0, 1, 30, 241, 804, 1344, 1268, 732, 270, 65, 10, 1, 0
Offset: 1

Views

Author

Christian G. Bower, May 09 2000

Keywords

Comments

Harary denotes the g.f. as P(x, y) on page 33 "... , and let P(x,y) = Sum Sum P_{nm} x^ny^m where P_{nm} is the number of planted trees with n points and m endpoints, in which again the plant has not been counted either as a point or as an endpoint." - Michael Somos, Nov 02 2014

Examples

			From _Joerg Arndt_, Aug 18 2014: (Start)
Triangle starts:
01: 1
02: 1    0
03: 1    1    0
04: 1    2    1    0
05: 1    4    3    1    0
06: 1    6    8    4    1    0
07: 1    9   18   14    5    1    0
08: 1   12   35   39   21    6    1    0
09: 1   16   62   97   72   30    7    1    0
10: 1   20  103  212  214  120   40    8    1    0
11: 1   25  161  429  563  416  185   52    9    1    0
12: 1   30  241  804 1344 1268  732  270   65   10    1    0
13: 1   36  348 1427 2958 3499 2544 1203  378   80   11    1    0
...
The trees with n=5 nodes, as (preorder-) level sequences, together with their number of leaves, and an ASCII rendering, are:
:
:     1:  [ 0 1 2 3 4 ]   1
:  O--o--o--o--o
:
:     2:  [ 0 1 2 3 3 ]   2
:  O--o--o--o
:        .--o
:
:     3:  [ 0 1 2 3 2 ]   2
:  O--o--o--o
:     .--o
:
:     4:  [ 0 1 2 3 1 ]   2
:  O--o--o--o
:  .--o
:
:     5:  [ 0 1 2 2 2 ]   3
:  O--o--o
:     .--o
:     .--o
:
:     6:  [ 0 1 2 2 1 ]   3
:  O--o--o
:     .--o
:  .--o
:
:     7:  [ 0 1 2 1 2 ]   2
:  O--o--o
:  .--o--o
:
:     8:  [ 0 1 2 1 1 ]   3
:  O--o--o
:  .--o
:  .--o
:
:     9:  [ 0 1 1 1 1 ]   4
:  O--o
:  .--o
:  .--o
:  .--o
:
This gives [1, 4, 3, 1, 0], row n=5 of the triangle.
(End)
G.f. = x*(y + x*y + x^2*(y + y^2) + x^3*(y + 2*y^2 + y^3) + x^4*(y + 4*y^2 + 3*x^3 + y^4) + ...).
		

References

  • F. Harary, Recent results on graphical enumeration, pp. 29-36 of Graphs and Combinatorics (Washington, Jun 1973), Ed. by R. A. Bari and F. Harary. Lect. Notes Math., Vol. 406. Springer-Verlag, 1974.

Crossrefs

Programs

  • Mathematica
    rut[n_]:=rut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[rut/@c]]]/@IntegerPartitions[n-1]];
    Table[Length[Select[rut[n],Count[#,{},{-2}]===k&]],{n,13},{k,n}] (* Gus Wiseman, Mar 19 2018 *)
  • PARI
    {T(n, k) = my(A = O(x)); if(k<1 || k>n, 0, for(j=1, n, A = x*(y - 1  + exp( sum(i=1, j, 1/i * subst( subst( A + x * O(x^(j\i)), x, x^i), y, y^i) ) ))); polcoeff( polcoeff(A, n), k))}; /* Michael Somos, Aug 24 2015 */

Formula

G.f. satisfies A(x, y) = x*y + x*EULER(A(x, y)) - x. Shifts up under EULER transform.
G.f. satisfies A(x, y) = x*y - x + x * exp(Sum_{i>0} A(x^i, y^i) / i). [Harary, p. 34, equation (10)]. - Michael Somos, Nov 02 2014
Sum_k T(n, k) = A000081(n). - Michael Somos, Aug 24 2015

A143773 Number of partitions of n such that every part is divisible by number of parts.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 1, 5, 1, 4, 3, 6, 1, 8, 1, 7, 5, 6, 1, 14, 2, 7, 8, 11, 1, 17, 1, 14, 11, 9, 3, 29, 1, 10, 15, 23, 1, 28, 1, 23, 25, 12, 1, 51, 2, 20, 25, 32, 1, 44, 11, 39, 31, 15, 1, 94, 1, 16, 40, 52, 19, 64, 1, 57, 45, 44, 1, 126, 1, 19, 83, 74, 6, 90, 1, 124, 63, 21, 1, 186
Offset: 1

Views

Author

Vladeta Jovovic, Aug 31 2008

Keywords

Examples

			The a(18) = 8 partitions are (18), (10 8), (12 6), (14 4), (16 2), (6 6 6), (9 6 3), (12 3 3). - _Gus Wiseman_, Jan 26 2018
		

Crossrefs

Programs

  • Mathematica
    m = 100;
    gf = Sum[x^(k^2)/Product[1-x^(k*i), {i, 1, k}], {k, 1, Sqrt[m]//Ceiling}];
    CoefficientList[gf + O[x]^m, x] // Rest (* Jean-François Alcover, May 13 2019 *)
  • PARI
    Vec(sum(k=1,20,x^(k^2)/prod(i=1,k,1-x^(k*i)+O(x^400)))) \\ Max Alekseyev, May 03 2009

Formula

G.f.: Sum(x^(k^2)/Product(1-x^(k*i), i=1..k), k=1..infinity).
For prime p, a(p) = 1 and a(p^2) = 2. For odd prime p, a(2*p) = (p + 1)/2. - Peter Bala, Mar 03 2025

Extensions

More terms from Max Alekseyev, May 03 2009

A298422 Number of rooted trees with n nodes in which all positive outdegrees are the same.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 5, 2, 6, 4, 9, 2, 20, 2, 26, 12, 53, 2, 120, 2, 223, 43, 454, 2, 1100, 11, 2182, 215, 4902, 2, 11446, 2, 24744, 1242, 56014, 58, 131258, 2, 293550, 7643, 676928, 2, 1582686, 2, 3627780, 49155, 8436382, 2, 19809464, 50, 46027323, 321202
Offset: 1

Views

Author

Gus Wiseman, Jan 19 2018

Keywords

Comments

Row sums of A298426.

Examples

			The a(9) = 6 trees: ((((((((o)))))))), (o(o(o(oo)))), (o((oo)(oo))), ((oo)(o(oo))), (ooo(oooo)), (oooooooo).
		

Crossrefs

Programs

  • Mathematica
    srut[n_]:=srut[n]=If[n===1,{{}},Select[Join@@Function[c,Union[Sort/@Tuples[srut/@c]]]/@Select[IntegerPartitions[n-1],Function[ptn,And@@(Divisible[#-1,Length[ptn]]&/@ptn)]],SameQ@@Length/@Cases[#,{},{0,Infinity}]&]];
    Table[srut[n]//Length,{n,20}]

Formula

a(n) = 2 <=> n in {A008864}. - Alois P. Heinz, Jan 20 2018

Extensions

a(44)-a(52) from Alois P. Heinz, Jan 20 2018

A299471 Regular triangle where T(n,k) is the number of labeled k-uniform hypergraphs spanning n vertices.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 41, 11, 1, 1, 768, 958, 26, 1, 1, 27449, 1042642, 32596, 57, 1, 1, 1887284, 34352419335, 34359509614, 2096731, 120, 1, 1, 252522481, 72057319189324805, 1180591620442534312297, 72057594021152435, 268434467, 247, 1, 1, 66376424160
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2018

Keywords

Examples

			Triangle begins:
  1;
  1,     1;
  1,     4,       1;
  1,    41,      11,     1;
  1,   768,     958,    26,  1;
  1, 27449, 1042642, 32596, 57, 1;
  ...
		

Crossrefs

Columns 1..4 are A000012, A006129, A302374, A302396.
Row sums are A306021.
The unlabeled version is A301922.
The connected version is A299354.

Programs

  • Mathematica
    Table[Sum[(-1)^(n-d)*Binomial[n,d]*2^Binomial[d,k],{d,0,n}],{n,10},{k,n}]
  • PARI
    T(n, k) = sum(d = 0, n, (-1)^(n-d)*binomial(n,d)*2^binomial(d,k)) \\ Andrew Howroyd, Jan 16 2024

Formula

T(n, k) = Sum_{d = 0..n} (-1)^(n-d)*binomial(n,d)*2^binomial(d,k).

A301342 Regular triangle where T(n,k) is the number of rooted identity trees with n nodes and k leaves.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 4, 1, 0, 0, 0, 1, 6, 5, 0, 0, 0, 0, 1, 9, 13, 2, 0, 0, 0, 0, 1, 12, 28, 11, 0, 0, 0, 0, 0, 1, 16, 53, 40, 3, 0, 0, 0, 0, 0, 1, 20, 91, 109, 26, 0, 0, 0, 0, 0, 0, 1, 25, 146, 254, 116, 6, 0, 0, 0, 0, 0, 0, 1, 30, 223, 524, 387, 61, 0, 0, 0, 0, 0, 0, 0, 1, 36
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Examples

			Triangle begins:
1
1   0
1   0   0
1   1   0   0
1   2   0   0   0
1   4   1   0   0   0
1   6   5   0   0   0   0
1   9  13   2   0   0   0   0
1  12  28  11   0   0   0   0   0
1  16  53  40   3   0   0   0   0   0
1  20  91 109  26   0   0   0   0   0   0
1  25 146 254 116   6   0   0   0   0   0   0
1  30 223 524 387  61   0   0   0   0   0   0   0
The T(6,2) = 4 rooted identity trees: (((o(o)))), ((o((o)))), (o(((o)))), ((o)((o))).
		

Crossrefs

Programs

  • Mathematica
    irut[n_]:=irut[n]=If[n===1,{{}},Join@@Function[c,Select[Union[Sort/@Tuples[irut/@c]],UnsameQ@@#&]]/@IntegerPartitions[n-1]];
    Table[Length[Select[irut[n],Count[#,{},{-2}]===k&]],{n,8},{k,n}]

A301922 Regular triangle where T(n,k) is the number of unlabeled k-uniform hypergraphs spanning n vertices.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 7, 3, 1, 1, 23, 29, 4, 1, 1, 122, 2102, 150, 5, 1, 1, 888, 7011184, 7013164, 1037, 6, 1, 1, 11302, 1788775603336, 29281354507753848, 1788782615612, 12338, 7, 1, 1, 262322, 53304526022885280592, 234431745534048893449761040648512, 234431745534048922729326772799024, 53304527811667884902, 274659, 8, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 19 2018

Keywords

Examples

			Triangle begins:
   1
   1   1
   1   2   1
   1   7   3   1
   1  23  29   4   1
The T(4,2) = 7 hypergraphs:
  {{1,2},{3,4}}
  {{1,3},{2,4},{3,4}}
  {{1,4},{2,4},{3,4}}
  {{1,2},{1,3},{2,4},{3,4}}
  {{1,4},{2,3},{2,4},{3,4}}
  {{1,3},{1,4},{2,3},{2,4},{3,4}}
  {{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}}
		

Crossrefs

Row sums are A301481. Second column is A002494.

Programs

  • Maple
    g:= (l, i, n)-> `if`(i=0, `if`(n=0, [[]], []), [seq(map(x->
         [x[], j], g(l, i-1, n-j))[], j=0..min(l[i], n))]):
    h:= (p, v)-> (q-> add((s-> add(`if`(andmap(i-> irem(k[i], p[i]
         /igcd(t, p[i]))=0, [$1..q]), mul((m-> binomial(m, k[i]*m
         /p[i]))(igcd(t, p[i])), i=1..q), 0), t=1..s)/s)(ilcm(seq(
        `if`(k[i]=0, 1, p[i]), i=1..q))), k=g(p, q, v)))(nops(p)):
    b:= (n, i, l, v)-> `if`(n=0 or i=1, 2^((p-> h(p, v))([l[], 1$n]))
         /n!, add(b(n-i*j, i-1, [l[], i$j], v)/j!/i^j, j=0..n/i)):
    A:= proc(n, k) A(n, k):= `if`(k>n-k, A(n, n-k), b(n$2, [], k)) end:
    T:= (n, k)-> A(n, k)-A(n-1, k):
    seq(seq(T(n, k), k=1..n), n=1..9);  # Alois P. Heinz, Aug 21 2019
  • PARI
    permcount(v)={my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    rep(typ)={my(L=List(), k=0); for(i=1, #typ, k+=typ[i]; listput(L,k); while(#L0, u=vecsort(apply(f, u)); d=lex(u,v)); !d}
    Q(n,k,perm)={my(t=0); forsubset([n,k], v, t += can(Vec(v), t->perm[t])); t}
    U(n,k)={my(s=0); forpart(p=n, s += permcount(p)*2^Q(n,k,rep(p))); s/n!}
    for(n=1, 10, for(k=1, n, print1(U(n,k)-U(n-1,k), ", ")); print) \\ Andrew Howroyd, Aug 10 2019

Formula

T(n,k) = A309858(n,k) - A309858(n-1,k). - Alois P. Heinz, Aug 21 2019

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 09 2019

A298423 Number of integer partitions of n such that the predecessor of each part is divisible by the number of parts.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 5, 2, 5, 4, 6, 2, 11, 2, 7, 8, 10, 2, 15, 2, 16, 11, 9, 2, 28, 7, 10, 14, 22, 2, 37, 2, 25, 18, 12, 17, 55, 2, 13, 23, 52, 2, 55, 2, 40, 51, 15, 2, 95, 13, 44, 34, 53, 2, 79, 37, 85, 41, 18, 2, 185, 2, 19, 80, 91, 54, 112, 2, 87, 56, 122, 2
Offset: 0

Views

Author

Gus Wiseman, Jan 19 2018

Keywords

Comments

Note that n is automatically divisible by the number of parts.

Examples

			The a(9) = 4 partitions: (9), (441), (711), (111111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Function[ptn,And@@(Divisible[#-1,Length[ptn]]&/@ptn)]]],{n,60}]

Formula

G.f.: Sum_{k>=0} x^k/Product_{i=1..k} (1-x^(k*i)).

A301345 Regular triangle where T(n,k) is the number of transitive rooted trees with n nodes and k leaves.

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 3, 1, 0, 0, 0, 1, 2, 4, 1, 0, 0, 0, 0, 3, 4, 5, 1, 0, 0, 0, 0, 2, 6, 6, 6, 1, 0, 0, 0, 0, 1, 6, 10, 9, 7, 1, 0, 0, 0, 0, 1, 5, 12, 16, 12, 8, 1, 0, 0, 0, 0, 0, 4, 13, 22, 23, 16, 9, 1, 0, 0, 0, 0, 0, 3, 14, 27, 36, 32, 20, 10, 1, 0, 0, 0, 0, 0, 2, 11
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Examples

			Triangle begins:
1
1   0
0   1   0
0   1   1   0
0   0   2   1   0
0   0   1   3   1   0
0   0   1   2   4   1   0
0   0   0   3   4   5   1   0
0   0   0   2   6   6   6   1   0
0   0   0   1   6  10   9   7   1   0
0   0   0   1   5  12  16  12   8   1   0
The T(9,5) = 6 transitive rooted trees: (o(o)(oo(o))), (o((oo))(oo)), (oo(o)(o(o))), (o(o)(o)(oo)), (ooo(o)((o))), (oo(o)(o)(o)).
		

Crossrefs

Programs

  • Mathematica
    rut[n_]:=rut[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[rut/@c]]]/@IntegerPartitions[n-1]];
    trat[n_]:=Select[rut[n],Complement[Union@@#,#]==={}&];
    Table[Length[Select[trat[n],Count[#,{},{-2}]===k&]],{n,15},{k,n}]
Showing 1-10 of 17 results. Next