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-19 of 19 results.

A347464 Number of even-length ordered factorizations of n^2 into factors > 1 with alternating product 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 1, 6, 2, 5, 1, 26, 1, 5, 5, 20, 1, 26, 1, 26, 5, 5, 1, 134, 2, 5, 6, 26, 1, 73, 1, 70, 5, 5, 5, 230, 1, 5, 5, 134, 1, 73, 1, 26, 26, 5, 1, 670, 2, 26, 5, 26, 1, 134, 5, 134, 5, 5, 1, 686, 1, 5, 26, 252, 5, 73, 1, 26, 5, 73, 1, 1714, 1, 5, 26
Offset: 1

Views

Author

Gus Wiseman, Sep 23 2021

Keywords

Comments

An ordered factorization of n is a sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
Also the number of ordered pairs of ordered factorizations of n, both of the same length.
Note that the version for all n (not just squares) is 0 except at perfect squares.

Examples

			The a(12) = 26 ordered factorizations:
  (2*2*6*6)      (3*2*4*6)      (6*2*2*6)  (4*2*3*6)  (12*12)
  (2*3*6*4)      (3*3*4*4)      (6*3*2*4)  (4*3*3*4)
  (2*4*6*3)      (3*4*4*3)      (6*4*2*3)  (4*4*3*3)
  (2*6*6*2)      (3*6*4*2)      (6*6*2*2)  (4*6*3*2)
  (2*2*2*2*3*3)  (3*2*2*2*2*3)
  (2*2*2*3*3*2)  (3*2*2*3*2*2)
  (2*2*3*2*2*3)  (3*3*2*2*2*2)
  (2*2*3*3*2*2)
  (2*3*2*2*3*2)
  (2*3*3*2*2*2)
For example, the ordered factorization 6*3*2*4 = 144 has alternating product 6/3*2/4 = 1, so is counted under a(12).
		

Crossrefs

Positions of 1's are A008578 (1 and A000040).
The restriction to powers of 2 is A000984.
Positions of 2's are A001248.
The not necessarily even-length version is A273013.
A000290 lists squares, complement A000037.
A001055 counts factorizations.
A027187 counts even-length partitions.
A074206 counts ordered factorizations.
A119620 counts partitions with alternating product 1, ranked by A028982.
A339846 counts even-length factorizations, ordered A347706.
A347438 counts factorizations with alternating product 1.
A347457 ranks partitions with integer alternating product.
A347460 counts possible alternating products of factorizations.
A347466 counts factorizations of n^2.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[Join@@Permutations/@facs[n^2],EvenQ[Length[#]]&&altprod[#]==1&]],{n,100}]
  • PARI
    A347464aux(n, k=0, t=1) = if(1==n, (0==k)&&(1==t), my(s=0); fordiv(n, d, if((d>1), s += A347464aux(n/d, 1-k, t*(d^((-1)^k))))); (s));
    A347464(n) = A347464aux(n^2); \\ Antti Karttunen, Oct 30 2021

A347466 Number of factorizations of n^2.

Original entry on oeis.org

1, 2, 2, 5, 2, 9, 2, 11, 5, 9, 2, 29, 2, 9, 9, 22, 2, 29, 2, 29, 9, 9, 2, 77, 5, 9, 11, 29, 2, 66, 2, 42, 9, 9, 9, 109, 2, 9, 9, 77, 2, 66, 2, 29, 29, 9, 2, 181, 5, 29, 9, 29, 2, 77, 9, 77, 9, 9, 2, 269, 2, 9, 29, 77, 9, 66, 2, 29, 9, 66, 2, 323, 2, 9, 29, 29
Offset: 1

Views

Author

Gus Wiseman, Sep 23 2021

Keywords

Comments

A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.

Examples

			The a(1) = 1 through a(8) = 11 factorizations:
  ()  (4)    (9)    (16)       (25)   (36)       (49)   (64)
      (2*2)  (3*3)  (2*8)      (5*5)  (4*9)      (7*7)  (8*8)
                    (4*4)             (6*6)             (2*32)
                    (2*2*4)           (2*18)            (4*16)
                    (2*2*2*2)         (3*12)            (2*4*8)
                                      (2*2*9)           (4*4*4)
                                      (2*3*6)           (2*2*16)
                                      (3*3*4)           (2*2*2*8)
                                      (2*2*3*3)         (2*2*4*4)
                                                        (2*2*2*2*4)
                                                        (2*2*2*2*2*2)
		

Crossrefs

Positions of 2's are the primes (A000040), which have squares A001248.
The restriction to powers of 2 is A058696.
The additive version (partitions) is A072213.
The case of integer alternating product is A347459, nonsquared A347439.
A000290 lists squares, complement A000037.
A001055 counts factorizations.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347050 = factorizations with alternating permutation, complement A347706.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n>k, 0, 1)+`if`(isprime(n), 0,
          add(`if`(d>k, 0, b(n/d, d)), d=numtheory[divisors](n) minus {1, n}))
        end:
    a:= proc(n) option remember; b((l-> mul(ithprime(i)^l[i], i=1..nops(l)))(
          sort(map(i-> i[2], ifactors(n^2)[2]), `>`))$2)
        end:
    seq(a(n), n=1..76);  # Alois P. Heinz, Oct 14 2021
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[facs[n^2]],{n,25}]
  • PARI
    A001055(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A001055(n/d, d))); (s));
    A347466(n) = A001055(n^2); \\ Antti Karttunen, Oct 13 2021

Formula

a(n) = A001055(A000290(n)).

A347447 Number of strict factorizations of n with alternating product > 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 4, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Sep 23 2021

Keywords

Comments

A strict factorization of n is an increasing sequence of distinct positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
All such factorizations must have odd length.

Examples

			The a(720) = 30 factorizations:
  (2*4*90)     (3*4*60)   (4*5*36)   (5*6*24)  (6*8*15)   (8*9*10)  (720)
  (2*5*72)     (3*5*48)   (4*6*30)   (5*8*18)  (6*10*12)
  (2*6*60)     (3*6*40)   (4*9*20)   (5*9*16)
  (2*8*45)     (3*8*30)   (4*10*18)
  (2*9*40)     (3*10*24)  (4*12*15)
  (2*10*36)    (3*12*20)
  (2*12*30)    (3*15*16)
  (2*15*24)
  (2*18*20)
  (2*3*120)
  (2*3*4*5*6)
		

Crossrefs

Allowing any alternating product gives A045778.
The reverse additive version (or restriction to powers of 2) is A067659.
The non-strict version is A339890.
Allowing equal parts and any alternating product < 1 gives A347440.
Allowing equal parts and any alternating product >= 1 gives A347456.
A046099 counts factorizations with no alternating permutations.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A339846 counts even-length factorizations.
A347437 counts factorizations with integer alternating product.
A347441 counts odd-length factorizations with integer alternating product.
A347460 counts possible alternating products of factorizations.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[facs[n],UnsameQ@@#&&altprod[#]>1&]],{n,100}]

A131514 Number of ways to design a set of three n-sided dice (using nonnegative integers) such that summing the faces can give any integer from 0 to n^3 - 1.

Original entry on oeis.org

1, 1, 1, 15, 1, 71, 1, 280, 15, 71, 1, 3660, 1, 71, 71, 5775, 1, 3660, 1, 3660, 71, 71, 1, 160440, 15, 71, 280, 3660, 1, 20365, 1, 126126, 71, 71, 71, 415185, 1, 71, 71, 160440, 1, 20365, 1, 3660, 3660, 71, 1, 6387150, 15, 3660, 71, 3660, 1, 160440, 71, 160440
Offset: 1

Views

Author

H.B. Wassenaar (towr(AT)ai.rug.nl), Aug 14 2007

Keywords

Comments

Also the number of ways to factor (x^(n^3)-1)/(x-1) into p(x)*q(x)*r(x), such that p(x),q(x),r(x) are polynomials with exactly n terms and all coefficients +1 (and all exponents nonnegative). (Krasner and Ranulac, 1937)
a(n) depends only on the prime signature of n. Hence a(n) will be 1 for all primes, 15 for all squares of primes, 71 for all products of distinct primes, and so on. - William P. Orrick, Jan 26 2023

Examples

			a(4)=15 because we can choose any of the following 15 configurations for our three dice:
  [ {0, 1,  2,  3}, {0, 4,  8, 12}, {0, 16, 32, 48} ],
  [ {0, 1,  2,  3}, {0, 4, 16, 20}, {0,  8, 32, 40} ],
  [ {0, 1,  2,  3}, {0, 4, 32, 36}, {0,  8, 16, 24} ],
  [ {0, 1,  4,  5}, {0, 2,  8, 10}, {0, 16, 32, 48} ],
  [ {0, 1,  4,  5}, {0, 2, 16, 18}, {0,  8, 32, 40} ],
  [ {0, 1,  4,  5}, {0, 2, 32, 34}, {0,  8, 16, 24} ],
  [ {0, 1,  8,  9}, {0, 2,  4,  6}, {0, 16, 32, 48} ],
  [ {0, 1,  8,  9}, {0, 2, 16, 18}, {0,  4, 32, 36} ],
  [ {0, 1,  8,  9}, {0, 2, 32, 34}, {0,  4, 16, 20} ],
  [ {0, 1, 16, 17}, {0, 2,  4,  6}, {0,  8, 32, 40} ],
  [ {0, 1, 16, 17}, {0, 2,  8, 10}, {0,  4, 32, 36} ],
  [ {0, 1, 16, 17}, {0, 2, 32, 34}, {0,  4,  8, 12} ],
  [ {0, 1, 32, 33}, {0, 2,  4,  6}, {0,  8, 16, 24} ],
  [ {0, 1, 32, 33}, {0, 2,  8, 10}, {0,  4, 16, 20} ],
  [ {0, 1, 32, 33}, {0, 2, 16, 18}, {0,  4,  8, 12} ].
		

Crossrefs

Programs

  • SageMath
    @cached_function
    def R3(i,j,k):
        if i > 1 and j==1 and k==1:
            return(1)
        elif j > 1 or k > 1:
            divList = divisors(i)[:-1]
            return(sum(G3(d,j,k) for d in divList) + sum(B3(d,j,k) for d in divList))
    @cached_function
    def G3(i,j,k):
        if i==1 and j > 1 and k==1:
            return(1)
        elif i > 1 or k > 1:
            divList = divisors(j)[:-1]
            return(sum(R3(i,d,k) for d in divList) + sum(B3(i,d,k) for d in divList))
    @cached_function
    def B3(i,j,k):
        if i==1 and j==1 and k > 1:
            return(1)
        elif i > 1 or j > 1:
            divList = divisors(k)[:-1]
            return(sum(R3(i,j,d) for d in divList) + sum(G3(i,j,d) for d in divList))
    def a3(n):
        if n == 1:
            return(1)
        else:
            return(R3(n,n,n) / 2) # William P. Orrick, Jan 26 2023

Formula

Recurrence: a(1) = 1. For n > 1, a(n) = r(n,n,n) / 2 where r(i,1,1) = g(1,j,1) = b(1,1,k) = 1 for all i, j, k > 1, r(i,j,k) = Sum_{d|i,dWilliam P. Orrick, Jan 26 2023

Extensions

Terms a(16) and beyond from William P. Orrick, Jan 26 2023

A347048 Number of even-length ordered factorizations of n with integer alternating product.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 6, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 11, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 1, 1, 0, 0, 0, 6, 3, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 8, 0, 1, 1, 7, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 10 2021

Keywords

Comments

An ordered factorization of n is a sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

			The a(n) ordered factorizations for n = 16, 32, 36, 48, 64, 96:
  4*4       8*4       6*6       12*4      8*8           24*4
  8*2       16*2      12*3      24*2      16*4          48*2
  2*2*2*2   2*2*4*2   18*2      2*2*6*2   32*2          3*2*8*2
            4*2*2*2   2*2*3*3   3*2*4*2   2*2*4*4       4*2*6*2
                      2*3*3*2   4*2*3*2   2*2*8*2       6*2*4*2
                      3*2*2*3   6*2*2*2   2*4*4*2       8*2*3*2
                      3*3*2*2             4*2*2*4       12*2*2*2
                                          4*2*4*2       2*2*12*2
                                          4*4*2*2
                                          8*2*2*2
                                          2*2*2*2*2*2
		

Crossrefs

Positions of 0's are A005117 \ {2}.
The restriction to powers of 2 is A027306.
Heinz numbers of partitions of this type are A028260 /\ A347457.
Positions of 3's appear to be A030514.
Positions of 1's are 1 and A082293.
Allowing non-integer alternating product gives A174725, unordered A339846.
The odd-length version is A347049.
The unordered version is A347438, reverse A347439.
Allowing any length gives A347463.
Partitions of this type are counted by A347704, reverse A035363.
A001055 counts factorizations (strict A045778, ordered A074206).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A339890 counts odd-length factorizations, ordered A174726.
A347050 = factorizations with alternating permutation, complement A347706.
A347437 = factorizations with integer alternating product, reverse A347442.
A347446 = partitions with integer alternating product, reverse A347445.
A347460 counts possible alternating products of factorizations.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[ordfacs[n],EvenQ[Length[#]]&&IntegerQ[altprod[#]]&]],{n,100}]
  • PARI
    A347048(n, m=n, ap=1, e=0) = if(1==n,!(e%2) && 1==numerator(ap), sumdiv(n, d, if(d>1, A347048(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Jul 28 2024

Formula

a(n) = A347463(n) - A347049(n).

Extensions

Data section extended up to a(105) by Antti Karttunen, Jul 28 2024

A347049 Number of odd-length ordered factorizations of n with integer alternating product.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 2, 3, 1, 1, 1, 7, 1, 1, 1, 11, 1, 1, 1, 5, 1, 1, 1, 3, 3, 1, 1, 14, 1, 3, 1, 3, 1, 5, 1, 5, 1, 1, 1, 7, 1, 1, 3, 15, 1, 1, 1, 3, 1, 1, 1, 24, 1, 1, 3, 3, 1, 1, 1, 14, 4, 1, 1, 7, 1, 1, 1, 5, 1, 7, 1, 3, 1, 1, 1, 24, 1, 3, 3, 11
Offset: 1

Views

Author

Gus Wiseman, Oct 10 2021

Keywords

Comments

An ordered factorization of n is a sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

			The a(n) ordered factorizations for n = 2, 8, 12, 16, 24, 32, 36, 48:
  2   8       12      16      24      32          36      48
      2*2*2   2*2*3   2*2*4   2*2*6   2*2*8       2*2*9   2*4*6
              3*2*2   2*4*2   3*2*4   2*4*4       2*3*6   3*2*8
                      4*2*2   4*2*3   4*2*4       2*6*3   3*4*4
                              6*2*2   4*4*2       3*2*6   4*2*6
                                      8*2*2       3*3*4   4*4*3
                                      2*2*2*2*2   3*6*2   6*2*4
                                                  4*3*3   6*4*2
                                                  6*2*3   8*2*3
                                                  6*3*2   12*2*2
                                                  9*2*2   2*2*12
                                                          2*2*2*2*3
                                                          2*2*3*2*2
                                                          3*2*2*2*2
		

Crossrefs

Positions of 2's appear to be A030078.
Positions of 3's appear to be A054753.
Positions of 1's appear to be A167207.
Allowing non-integer alternating product gives A174726, unordered A339890.
The even-length version is A347048.
The unordered version is A347441, with same reverse version.
The case of partitions is A347444, ranked by A347453.
Allowing any length gives A347463.
A001055 counts factorizations (strict A045778, ordered A074206).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A339846 counts even-length factorizations, ordered A174725.
A347050 = factorizations with alternating permutation, complement A347706.
A347437 = factorizations with integer alternating product, reverse A347442.
A347438 = factorizations with alternating product 1, on squares A273013.
A347439 = factorizations with integer reciprocal alternating product.
A347446 = partitions with integer alternating product, reverse A347445.
A347457 lists Heinz numbers of partitions with integer alternating product.
A347460 counts possible alternating products of factorizations.
A347708 counts possible alternating products of odd-length factorizations.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[ordfacs[n],OddQ[Length[#]]&&IntegerQ[altprod[#]]&]],{n,100}]
  • PARI
    A347049(n, m=n, ap=1, e=0) = if(1==n,(e%2) && 1==denominator(ap), sumdiv(n, d, if(d>1, A347049(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Jul 28 2024

Formula

a(n) = A347463(n) - A347048(n).

Extensions

Data section extended up to a(100) by Antti Karttunen, Jul 28 2024

A360098 Square array read by antidiagonals upwards: T(n,k) is the number of ways of choosing nonnegative numbers for k n-sided dice, k >= 0, n >= 1, so that summing the faces can give any integer from 0 to n^k - 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 7, 1, 105, 1, 1, 1, 1, 1, 1, 71, 1, 945, 1, 1, 1, 1, 1, 10, 1, 1001, 1, 10395, 1, 1, 1, 1, 1, 3, 280, 1, 18089, 1, 135135, 1, 1, 1, 1, 1, 7, 15, 15400, 1, 398959, 1
Offset: 1

Views

Author

William P. Orrick, Jan 25 2023

Keywords

Comments

T(n,k) depends on n only through its prime signature. (See A118914.) For example, for fixed k, T(p*q^2,k) will be the same for any pair of distinct primes p and q. Hence we may define T(n,k) = R(s(n),k), where s(n) is the prime signature of n.
Also the number of Krasner factorizations of (x^(n^k)-1) / (x-1) into k polynomials each having n nonzero terms all with coefficient +1. (Krasner and Ranulac, 1937)

Examples

			There are 3 ways to assign numbers to two 4-sided dice:
 {{0, 1, 2, 3}, {0, 4, 8, 12}},
 {{0, 1, 8, 9}, {0, 2, 4,  6}},
 {{0, 1, 4, 5}, {0, 2, 8, 10}}.
The northwest corner of T(n,k) begins:
  1   1    1    1       1          1             1 ...     (s(1)  = {})
  1   1    1    1       1          1             1 ...     (s(2)  = {1})
  1   1    1    1       1          1             1 ...     (s(3)  = {1})
  1   1    3   15     105        945         10395 ...     (s(4)  = {2})
  1   1    1    1       1          1             1 ...     (s(5)  = {1})
  1   1    7   71    1001      18089        398959 ...     (s(6)  = {1,1})
  1   1    1    1       1          1             1 ...     (s(7)  = {1})
  1   1   10  280   15400    1401400     190590400 ...     (s(8)  = {3})
  1   1    3   15     105        945         10395 ...     (s(9)  = {2})
  1   1    7   71    1001      18089        398959 ...     (s(10) = {1,1})
  1   1    1    1       1          1             1 ...     (s(11) = {1})
  1   1   42  3660 614040  169200360   69444920160 ...     (s(12) = {1,2})
  1   1    1    1       1          1             1 ...     (s(13) = {1})
  1   1    7   71    1001      18089        398959 ...     (s(14) = {1,1})
  1   1    7   71    1001      18089        398959 ...     (s(15) = {1,1})
  1   1   35 5775 2627625 2546168625 4509264634875 ...     (s(16) = {4})
  ...
		

Crossrefs

For rows of index n = p^j, p prime, or equivalently, for rows of signature {j} we have T(p^2,k) = R({2},k) = A001147(k), T(p^3,k) = R({3},k) = A025035(k), T(p^4,k) = R({4},k) = A025036(k), and, generally, T(p^j,k) = R({j},k) = the k-th element of the j-th column of the square array A060540.
For n = p * q, p and q distinct primes, we have T(p*q,k) = R({1,1},k) = |A002119(k)|.
Column correspondences are T(n,2) = A273013(n) and T(n,3) = A131514(n).
Cf. A118914.

Programs

  • SageMath
    @cached_function
    def r(i,M):
        kminus1 = len(M)
        u = tuple([1 for j in range(kminus1)])
        if i > 1 and M == u:
            return(1)
        elif M != u:
            divList = divisors(i)[:-1]
            return(sum(r(M[j],tuple(sorted(M[:j]+tuple([d])+M[j+1:]))) for d in divList for j in range(kminus1)))
    def T(n,k):
        if n == 1 or k == 0:
            return(1)
        else:
            return(r(n,tuple([n for j in range(k-1)]))) / factorial(k-1)

Formula

Use M to denote a (k-1)-element multiset of positive integers. Let U denote the (k-1)-element multiset whose elements all equal 1 and let N denote the (k-1)-element multiset whose elements all equal n. For i in M, let M_{i,j} denote the result of replacing i with j in M. Then T(1,k) = T(n,0) = 1, while for n > 1 and k > 0 we have T(n,k) = r(n,N) / (k-1)! where r(i,M) is given by the recurrence
r(i,U) = 1 for i > 1,
r(i,M) = Sum_{m in M} Sum_{d|i,d

A360439 Square array read by antidiagonals upwards: T(n,k), n>=0, k>=0, is the number of ways of choosing nonnegative numbers for k indistinguishable (p^n*q)-sided dice so that it is possible to roll every number from 0 to (p^n*q)^k-1, where p and q are distinct primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 42, 71, 1, 1, 1, 230, 3660, 1001, 1, 1, 1, 1190, 160440, 614040, 18089, 1, 1, 1, 5922, 6387150, 299145000, 169200360, 398959, 1, 1, 1, 28644, 238504266, 127534407000, 1175153779800, 69444920160, 10391023, 1
Offset: 0

Author

William P. Orrick, Feb 18 2023

Keywords

Comments

Also the number of Krasner factorizations of (x^((p^n*q)^k)-1) / (x-1) into k polynomials each having p^n*q nonzero terms all with coefficient +1. (Krasner and Ranulac, 1937)

Examples

			For two ten-sided dice we have k = 2 and n = 1 since 10 = 2^1*5. The seven configurations are
  {{0,1,2,3,4,5,6,7,8,9}, {0,10,20,30,40,50,60,70,80,90}},
  {{0,1,2,3,4,50,51,52,53,54}, {0,5,10,15,20,25,30,35,40,45}},
  {{0,1,2,3,4,25,26,27,28,29}, {0,5,10,15,20,50,55,60,65,70}},
  {{0,1,10,11,20,21,30,31,40,41}, {0,2,4,6,8,50,52,54,56,58}},
  {{0,1,20,21,40,41,60,61,80,81}, {0,2,4,6,8,10,12,14,16,18}},
  {{0,1,2,3,4,10,11,12,13,14}, {0,5,20,25,40,45,60,65,80,85}},
  {{0,1,4,5,8,9,12,13,16,17}, {0,2,20,22,40,42,60,62,80,82}}.
Array begins:
  1  1      1           1                  1                         1  ...
  1  1      7          71               1001                     18089  ...
  1  1     42        3660             614040                 169200360  ...
  1  1    230      160440          299145000             1175153779800  ...
  1  1   1190     6387150       127534407000          6888547183518000  ...
  1  1   5922   238504266     49829456981304      36179571823974699120  ...
  1  1  28644  8507955456  18306027156441024  175934152220744900062080  ...
  ...
		

Crossrefs

For a table with the number of sides not restricted to the form p^n*q see A360098.
T(n,2) = A349427(n+1).
T(1,k) = |A002119(k)|.

Programs

  • SageMath
    def T(n,k):
        return(factorial(k*n)/factorial(n)^k/factorial(k)\
         * sum((-n)^(k-j)*binomial(n*k+j,j)*falling_factorial(k,j)\
         for j in range(k+1)))

Formula

T(n,k) = (n*k)!/((n!)^k*k!) * Sum_{j=0}^k (-n)^(k-j)*binomial(n*k+j,j)*k!/(k-j)!.
T(n,k) = A060540(k,n) * Sum_{j=0}^k (-n)^(k-j)*binomial(n*k+j,j)*k!/(k-j)! for n>=1, k>=1.

A360440 Square array read by antidiagonals upwards: T(n,k), n>=0, k>=0, is the number of ways of choosing nonnegative numbers for k indistinguishable A063008(n)-sided dice so that it is possible to roll every number from 0 to (A063008(n))^k-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 7, 15, 1, 1, 1, 1, 10, 71, 105, 1, 1, 1, 1, 42, 280, 1001, 945, 1, 1, 1, 1, 115, 3660, 15400, 18089, 10395, 1, 1, 1, 1, 35, 20365, 614040, 1401400, 398959, 135135, 1, 1
Offset: 0

Author

William P. Orrick, Feb 19 2023

Keywords

Comments

The number of configurations depends on the number of sides on the dice only through its prime signature. A063008 provides a canonical representative of each prime signature.
Also the number of Krasner factorizations of (x^(A063008(n))^k)-1) / (x-1) into k polynomials each having A063008(n) nonzero terms all with coefficient +1. (Krasner and Ranulac, 1937)

Examples

			A063008(2) = 4. There are 3 ways to assign numbers to two 4-sided dice:
 {{0, 1, 2, 3}, {0, 4, 8, 12}},
 {{0, 1, 8, 9}, {0, 2, 4,  6}},
 {{0, 1, 4, 5}, {0, 2, 8, 10}}.
The table begins:
  1  1    1       1          1              1                 1  ...
  1  1    1       1          1              1                 1  ...
  1  1    3      15        105            945             10395  ...
  1  1    7      71       1001          18089            398959  ...
  1  1   10     280      15400        1401400         190590400  ...
  1  1   42    3660     614040      169200360       69444920160  ...
  1  1  115   20365    6891361     3815893741     3141782433931  ...
  1  1   35    5775    2627625     2546168625     4509264634875  ...
  1  1  230  160440  299145000  1175153779800  8396156461492800  ...
  ...
The rows shown enumerate configurations for dice of 1, 2, 4, 6, 8, 12, 30, 16, and 24 sides, which represent the prime signatures {}, {1}, {2}, {1,1}, {3}, {2,1}, {1,1,1}, {4}, and {3,1}.
		

Crossrefs

The concatenation of all prime signatures, listed in the order that corresponds to the rows of T(n,k), is A080577.
T(3,k) is |A002119(k)|. Starting with k = 1, T(1,k), T(2,k), T(4,k), and T(7,k) are given by columns 1-4 of A060540.
Row n is row A063008(n) of A360098.

Programs

  • SageMath
    @cached_function
    def r(i,M):
        kminus1 = len(M)
        u = tuple([1 for j in range(kminus1)])
        if i > 1 and M == u:
            return(1)
        elif M != u:
            divList = divisors(i)[:-1]
            return(sum(r(M[j],tuple(sorted(M[:j]+tuple([d])+M[j+1:])))\
             for d in divList for j in range(kminus1)))
    def f(n,k):
        if n == 1 or k == 0:
            return(1)
        else:
            return(r(n,tuple([n for j in range(k-1)]))) / factorial(k-1)
    # The following function produces the top left corner of the table:
    def TArray(maxn,maxk):
        retArray = []
        primesList = []
        ptnSum = 0
        ptnItr = Partitions(ptnSum)
        ptn = ptnItr.first()
        n = 0
        while n <= maxn:
            if ptn == None:
                primesList.append(Primes()[ptnSum])
                ptnSum = ptnSum + 1
                ptnItr = Partitions(ptnSum)
                ptn = ptnItr.first()
            prdct = prod(primesList[j]^ptn[j] for j in range(len(ptn)))
            retArray.append([f(prdct,k) for k in range(maxk+1)])
            n = n + 1
            ptn = ptnItr.next(ptn)
        return(retArray)

Formula

T(n,k) = f(A063008(n),k), where f(n,k) is the table given by A360098.
Previous Showing 11-19 of 19 results.