A273013 Number of different arrangements of nonnegative integers on a pair of n-sided dice such that the dice can add to any integer from 0 to n^2-1.
1, 1, 1, 3, 1, 7, 1, 10, 3, 7, 1, 42, 1, 7, 7, 35, 1, 42, 1, 42, 7, 7, 1, 230, 3, 7, 10, 42, 1, 115, 1, 126, 7, 7, 7, 393, 1, 7, 7, 230, 1, 115, 1, 42, 42, 7, 1, 1190, 3, 42, 7, 42, 1, 230, 7, 230, 7, 7, 1, 1158, 1, 7, 42, 462, 7, 115, 1, 42, 7, 115, 1, 3030
Offset: 1
Examples
When n = 4, a(n) = 3; the three arrangements are (0,1,2,3; 0,4,8,12), (0,1,4,5; 0,2,8,10), (0,1,8,9; 0,2,4,6). When n = 5, a(n) = 1; the sole arrangement is (0,1,2,3,4; 0,5,10,15,20).
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- Matthew C. Lettington and Karl Michael Schmidt, Divisor Functions and the Number of Sum Systems, arXiv:1910.02455 [math.NT], 2019.
- S. Harry White, Reversible Squares
Crossrefs
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], altprod[#] == 1&]],{n, 30}] (* Gus Wiseman, Oct 29 2021 *) (* or *) ofc[n_,k_] := If[k > PrimeOmega[n], 0, If[k == 0 && n == 1, 1, Sum[ofc[n/d, k-1],{d, Rest[Divisors[n]]}]]]; Table[If[n == 1, 1, Sum[ofc[n, x]^2 + ofc[n, x]*ofc[n, x+1], {x, n}]],{n, 30}] (* Gus Wiseman, Oct 29 2021, based on author's formula *)
-
PARI
A273013aux(n, k=0, t=1) = if(1==n, (1==t), my(s=0); fordiv(n, d, if((d>1), s += A273013aux(n/d, 1-k, t*(d^((-1)^k))))); (s)); A273013(n) = A273013aux(n^2); \\ Antti Karttunen, Oct 30 2021
-
SageMath
@cached_function def r(m,n): if n==1: return(1) divList = divisors(m)[:-1] return(sum(r(n,d) for d in divList)) def A273013(n): return(r(n,n)) # William P. Orrick, Feb 19 2023
Formula
a(n) = b_1^2 + b_2^2 + b_3^2 + ... + b_1*b_2 + b_2*b_3 + b_3*b_4 + ..., where b_k is the number of different permutations of k divisors of n to achieve a product of n. For example, for n=24, b_3 = 9 (6 permutations of 2*3*4 and 3 permutations of 2*2*6).
a(n) = r(n,n) where r(m,1) = 1 and r(m,n) = Sum_{d|m,dWilliam P. Orrick, Feb 19 2023
Comments