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 31-34 of 34 results.

A238975 Number of perfect partitions in canonical order.

Original entry on oeis.org

1, 1, 2, 3, 4, 8, 13, 8, 20, 26, 44, 75, 16, 48, 76, 132, 176, 308, 541, 32, 112, 208, 368, 252, 604, 1076, 818, 1460, 2612, 4683, 64, 256, 544, 976, 768, 1888, 3408, 2316, 3172, 5740, 10404, 7880, 14300, 25988, 47293, 128, 576, 1376, 2496, 2208, 5536, 10096, 2568
Offset: 0

Views

Author

Sung-Hyuk Cha, Mar 07 2014

Keywords

Examples

			Triangle T(n,k) begins:
   1;
   1;
   2,   3;
   4,   8,  13;
   8,  20,  26,  44,  75;
  16,  48,  76, 132, 176, 308,  541;
  32, 112, 208, 368, 252, 604, 1076, 818, 1460, 2612, 4683;
  ...
		

Crossrefs

Row sums are A035341.
Cf. A238962 in canonical order, A002033.

Programs

  • Maple
    g:= proc(n) option remember; (1+add(g(n/d),
          d=numtheory[divisors](n) minus {1, n}))
        end:
    b:= (n, i)-> `if`(n=0 or i=1, [[1$n]], [map(x->
        [i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
    T:= n-> map(x-> g(mul(ithprime(i)^x[i], i=1..nops(x))), b(n$2))[]:
    seq(T(n), n=0..9);  # Alois P. Heinz, Apr 26 2020
  • Mathematica
    (* b is A074206 *)
    b[n_] := b[n] = If[n < 2, n, b /@ Most[Divisors[n]] // Total];
    T[n_] := b /@ (Product[Prime[k]^#[[k]], {k, 1, Length[#]}]& /@ IntegerPartitions[n]);
    T /@ Range[0, 9] // Flatten (* Jean-François Alcover, Jan 04 2021 *)
  • PARI
    \\ here b(n) is A074206.
    N(sig)={prod(k=1, #sig, prime(k)^sig[k])}
    b(n)={if(!n, 0, my(sig=factor(n)[,2], m=vecsum(sig)); sum(k=0, m, prod(i=1, #sig, binomial(sig[i]+k-1, k-1))*sum(r=k, m, binomial(r,k)*(-1)^(r-k))))}
    Row(n)={apply(s->b(N(s)), vecsort([Vecrev(p) | p<-partitions(n)], , 4))}
    { for(n=0, 6, print(Row(n))) } \\ Andrew Howroyd, Aug 30 2020

Formula

T(n,k) = A074206(A063008(n,k)). - Andrew Howroyd, Apr 26 2020

Extensions

Offset changed and terms a(42) and beyond from Andrew Howroyd, Apr 26 2020

A329541 Triangle read by rows: T(n,k) is the number of colored digraphs on n nodes with exactly k colors assigned in a fix order according the node count (1 <= k <= n).

Original entry on oeis.org

1, 3, 4, 16, 36, 64, 218, 1856, 2112, 4096, 9608, 136376, 445440, 528384, 1048576, 1540944, 62020640, 270506880, 449511424, 537919488, 1073741824, 882033440, 55259421024, 435010671104, 1101584588800, 1834672455680, 2200096997376, 4398046511104
Offset: 1

Views

Author

Peter Dolland, Nov 16 2019

Keywords

Comments

The values are just subtotals of the rows of the irregular triangle A328773.
Colors C_1,...,C_k are assigned to n nodes in the way that a_i >= a_(i+1) >= 1 for 1 <= i < k, where a_i denotes the number of nodes colored with C_i.
T(n,k) gives the number of digraphs (see A000273) without restrictions, where nodes of the same color are not differentiated.
The order of the colors effects, that only one color scheme has to be considered for a given color count. If such an order may not be presupposed, you should note A329546.

Examples

			Partitions for n=4, k=2: [3,1] and [2,2] with indices 2 and 3: T(4,2) = Sum_{i=2,3} A328773(4,i) = 752 + 1104 = 1856.
Partitions for n=6, k=3: [4,1,1], [3,2,1], [2,2,2] with indices 4, 6, 8: T(6,3) = Sum_{i=4,6,8} A328773(6,i) = 45277312 + 90196736 + 135032832 = 270506880.
Triangle T(n,k) begins:
        1
        3        4
       16       36        64
      218     1856      2112      4096
     9608   136376    445440    528384   1048576
  1540944 62020640 270506880 449511424 537919488 1073741824
  ...
		

Crossrefs

Cf. A000273 (digraphs with one color), A053763 (digraphs with n colors), A328773 (digraphs to a given color scheme). A329546 (digraphs with unordered colors).

Programs

  • PARI
    \\ here C(p) computes A328773 sequence value for given partition.
    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}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
    C(p)={((i, v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v, Vec(q)))); s/p[i]!))(1, [])}
    Row(n)={[vecsum(apply(C, vecsort([Vecrev(p) | p<-partitions(n),#p==m], , 4))) | m<-[1..n]]}
    { for(n=0, 10, print(Row(n))) }

Formula

T(n,1) = A000273(n) = A328773(n,1).
T(n,n) = 2^(n^2-n) = A053763(n) = A328773(n,A000041(n)).
T(n,n-1) = A328773(n,A000041(n)-1).
T(n,k) = Sum_{i=1..A000041(n), A063008(n,i) encodes a partition p with k=#p} A328773(n,i).

A329546 Triangle read by rows: T(n,k) is the number of colored digraphs on n nodes with exactly k colors arbitrarily assigned (1 <= k <= n).

Original entry on oeis.org

1, 3, 4, 16, 72, 64, 218, 2608, 6336, 4096, 9608, 272752, 1336320, 2113536, 1048576, 1540944, 93847104, 812045184, 2337046528, 2689597440, 1073741824, 882033440, 110518842048, 1580861402112, 7344135176192, 14676310097920, 13200581984256, 4398046511104
Offset: 1

Views

Author

Peter Dolland, Nov 16 2019

Keywords

Comments

The values are weighted subtotals of the rows of the irregular triangle A328773.
The weight of a color scheme is the multiplicity A072811(n,k) with k as the index of the induced partition.
T(n,k) gives the number of digraphs (see A000273) without restrictions, where nodes of the same color are not differentiated.
If we do not consider the exchange of colors with different sizes to be different digraphs, we can impose an order on the colors, which leads to A329541.

Examples

			First six rows:
      1
      3        4
     16       72        64
    218     2608      6336       4096
   9608   272752   1336320    2113536    1048576
1540944 93847104 812045184 2337046528 2689597440 1073741824
n=4, k=2: Partitions: [3,1] and [2,2] with indices 2 and 3 and multiplicities 2 and 1: T(4,2) = Sum_{i=2,3} A072811(4,i)*A328773(4,i) = 2*752 + 1104 = 2608.
n=6, k=3: Partitions: [4,1,1], [3,2,1], [2,2,2] with indexes 4, 6, 8 and multiplicities 3, 6, 1: T(6,3) = Sum_{i=4,6,8} A072811(6,i)*A328773(6,i) = 3*45277312 + 6*90196736 + 1*135032832 = 812045184.
		

Crossrefs

Cf. A000273 (digraphs with one color), A053763 (digraphs with n colors), A328773 (digraphs to a given color scheme).
Cf. A072811 (multiplicity of color schemes).
Cf. A329541 (ordered colors).
Cf. A309980 (reflexive/anti-reflexive: just two colors).

Programs

  • PARI
    \\ here C(p) computes A328773 sequence value for given partition.
    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}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
    C(p)={((i, v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v, Vec(q)))); s/p[i]!))(1, [])}
    \\ here mulp(v) computes the multiplicity of the given partition. (see A072811)
    mulp(v) = {my(p=(#v)!, k=1); for(i=2, #v, k=if(v[i]==v[i-1], k+1, p/=k!; 1)); p/k!}
    wC(p)=mulp(p)*C(p)
    Row(n)={[vecsum(apply(wC, vecsort([Vecrev(p) | p<-partitions(n),#p==m], , 4))) | m<-[1..n]]}
    { for(n=0, 10, print(Row(n))) }

Formula

T(n,1) = A000273(n) = A328773(n,1).
T(n,n) = A053763(n) = A328773(n,A000041(n)).
T(n,n-1) = (n-1)*A328773(n,A000041(n)-1).
T(n,k) = Sum_{i=1..A000041(n), A063008(n,i) encodes a partition with k elements} A072811(n,i)*A328773(n,i).

A332567 T(n,k) is the k-th partition of n in graded reverse lexicographic ordering (A080577) encoded as concatenation of parts which are represented in (zeroless) bijective base-9 numeration (A052382) and separated by zeros; triangle T(n,k), n >= 0, 1 <= k <= A000041(n), read by rows.

Original entry on oeis.org

0, 1, 2, 101, 3, 201, 10101, 4, 301, 202, 20101, 1010101, 5, 401, 302, 30101, 20201, 2010101, 101010101, 6, 501, 402, 40101, 303, 30201, 3010101, 20202, 2020101, 201010101, 10101010101, 7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, 3020101, 301010101
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2020

Keywords

Comments

The encoding used here allows a lossless and human-readable compression of all partitions. To decode a term replace the zeros with commas and read the parts in bijective base 9.
The empty partition is encoded as 0.

Examples

			T(6,6) = 30201 encodes the 6th partition of 6: [3,2,1].
T(10,1) = 11 encodes the 1st partition of 10: [10].
T(23,23) = 18040101 encodes the 23rd partition of 23: [17,4,1,1].
Triangle T(n,k) begins:
   0;
   1;
   2, 101;
   3, 201, 10101;
   4, 301, 202, 20101, 1010101;
   5, 401, 302, 30101, 20201, 2010101, 101010101;
   6, 501, 402, 40101, 303, 30201, 3010101, 20202, 2020101, ...
   7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, ...
   8, 701, 602, 60101, 503, 50201, 5010101, 404, 40301, 40202, ...
   9, 801, 702, 70101, 603, 60201, 6010101, 504, 50301, 50202, ...
  11, 901, 802, 80101, 703, 70201, 7010101, 604, 60301, 60202, ...
  ...
		

Crossrefs

Column k=1 gives A052382 (for n>0).
Last row elements give A094028(n-1) (for n>0).

Programs

  • Maple
    g:= proc(n) option remember; local d, m, l; m, l:= n, "";
          while m>0 do d:= irem(m, 9, 'm');
            if d=0 then d:=9; m:= m-1 fi; l:= d, l
          od; parse(cat(l))
        end:
    b:= (n, i)-> `if`(n=0, [""], `if`(i<1, [], [map(x-> cat(
         0, g(i), x), b(n-i, min(n-i, i)))[], b(n, i-1)[]])):
    T:= n-> map(x-> parse(cat(0, x)), b(n$2))[]:
    seq(T(n), n=0..10);
Previous Showing 31-34 of 34 results.