

A032801


Number of unordered sets a, b, c, d of distinct integers from 1..n such that a+b+c+d = 0 (mod n).


2



0, 0, 0, 0, 1, 3, 5, 9, 14, 22, 30, 42, 55, 73, 91, 115, 140, 172, 204, 244, 285, 335, 385, 445, 506, 578, 650, 734, 819, 917, 1015, 1127, 1240, 1368, 1496, 1640, 1785, 1947, 2109, 2289, 2470, 2670, 2870, 3090, 3311, 3553, 3795, 4059, 4324, 4612, 4900, 5212, 5525
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


COMMENTS

From Petros Hadjicostas, Jul 12 2019: (Start)
By reading carefully the proof of Lemma 5.1 (pp. 6566) in Barnes (1959), we see that he actually proved a general result (even though he does not state it in the lemma). For 1 <= k <= n, let T(n, k) be the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = 0 (mod n). The proof of Lemma 5.1 in the paper implies that T(n, k) = (1/n) * Sum_{s  gcd(n, k)} (1)^(k  (k/s)) * phi(s) * binomial(n/s, k/s).
For fixed k >= 1, the g.f. of the sequence (T(n, k): n >= 1) (with T(n, k) = 0 for 1 <= n < k) is (x^k/k) * Sum_{sk} phi(s) * (1)^(k  (k/s)) / (1  x^s)^(k/s).
For k = 4, we get T(n, k=4) = (1/n) * Sum_{d  gcd(n, 4)} (1)^(4/s) * phi(d) * binomial(n/d, 4/d), which agrees with Barnes' 3part formula in Lemma 5.1 and with the formula in N. J. A. Sloane's Maple program below. It also agrees with Colin Barker's formula below.
For k = 4, the g.f. is (x^4/4) * Sum_{s4} phi(s) * (1)^(4/s) /(1  x^s)^(4/s), which agrees with Herbert Kociemba's g.f. below.
Barnes' (1959) formula is a special case of Theorem 4 (p. 66) in Ramanathan (1944). If R(n, k, v) is the number of unordered sets b_1, b_2, ..., b_k of k distinct integers from 1..n such that b_1 + b_2 + ... + b_k = v (mod n), then he proved that R(n, k, v) = (1/n) * Sum_{s  gcd(n,k)} (1)^(k  (k/s)) * binomial(n/s, k/s) * C_s(v), where C_s(v) = A054533(s, v) is Ramanujan's sum (even though it was discovered first around 1900 by the Austrian mathematician R. D. von Sterneck).
Because C_s(v = 0) = phi(s), we get Barnes' (implicit) result; i.e., R(n, k, v=0) = T(n, k) and a(n) = R(n, k=4, v=0) = T(n, k=4).
For k=2, we have R(n, k=2, v=0) = T(n, k=2) = A004526(n1) for n >= 1. For k=3, we have R(n, k=3, v=0) = T(n, k=3) = A058212(n) for n >= 1. For k=5, we have R(n, k=5, v=0) = T(n, k=5) = A008646(n5) for n >= 5.
(End)
Von Sterneck (1902, 1903) dealt with this problem. In his notation, we need to find (n)_i, the number of integer solutions of the congruence n = x_1 + ... + x_i (mod M) such that 0 <= x_1 < x_2 < ... < x_i < M, where (his n) = 0, (his M) = (our n), and (his i) = 4. He gave several formulas for solving this problem for various cases of his M (M = prime, M = product of two primes, M = power of 2, etc.).  Petros Hadjicostas, Aug 20 2019


REFERENCES

E. V. McLaughlin, Numbers of factorizations in nonunique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, April 2004.


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Eric Stephen Barnes, The construction of perfect and extreme forms I, Acta Arith., 5 (1959); see pp. 6566.
K. G. Ramanathan, Some applications of Ramanujan's trigonometrical sum C_m(n), Proc. Indian Acad. Sci., Sect. A 20 (1944), 6269; see p. 66.
R. D. von Sterneck, Ein Analogon zur additiven Zahlentheorie, Sitzungsber. Akad. Wiss. Sapientiae Math.Naturwiss. Kl. 111 (1902), 15671601 (Abt. IIa). [Accessible only in the USA through the HathiTrust Digital Library.]
R. D. von Sterneck, Über ein Analogon zur additiven Zahlentheorie, Jahresbericht der Deutschen MathematikerVereinigung 12 (1903), 110113. [This is a summary of the 1902 paper.]
Index entries for linear recurrences with constant coefficients, signature (2,0,2,2,2,0,2,1).


FORMULA

G.f.: x^5*(1+xx^2+x^3)/((1+x)^4*(1+x)^2*(1+x^2)).  Herbert Kociemba, Oct 22 2016
a(n) = (6 * (4 + 2*(1)^n + (i)^n + i^n) + (25 + 3*(1)^n)*n  12*n^2 + 2*n^3)/48, where i = sqrt(1).  Colin Barker, Oct 23 2016


MAPLE

f := n> if n mod 2 <> 0 then (n1)*(n2)*(n3)/24 elif n mod 4 = 0 then (n4)*(n^22*n+6)/24 else (n2)*(n^24*n+6)/24; fi;


MATHEMATICA

CoefficientList[Series[(x^3 / 4) (1 / (1  x)^4 + 1 / (1  x^2)^2  2 / (1  x^4)), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 13 2019 *)


CROSSREFS

Cf. A001399, A001400, A004526, A008646, A054533, A058212.
Column k=4 of A267632.
Sequence in context: A053618 A268345 A267047 * A332641 A033818 A320598
Adjacent sequences: A032798 A032799 A032800 * A032802 A032803 A032804


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


EXTENSIONS

Offset changed by David A. Corneth, Oct 23 2016


STATUS

approved



