OFFSET
9,2
COMMENTS
For an integer s multiple of 8, this is also the number of subsets of 8 integers between 1 and n such that their sum is s modulo n.
LINKS
David Broadhurst and Xavier Roulleau, Number of partitions of modular integers, arXiv:2502.19523 [math.NT], 2025.
Index entries for linear recurrences with constant coefficients, signature (4,-4,-4,11,-8,0,8,-10,0,8,0,-10,8,0,-8,11,-4,-4,4,-1).
FORMULA
G.f.: x^9*(1 + x - x^2 + 7*x^3 - 4*x^4 + 6*x^5 + 4*x^6 - 4*x^7 + 3*x^8 + 5*x^9 - 3*x^10 + x^11)/((1 - x)^4*(1 - x^2)^2*(1 - x^4)*(1 - x^8)).
a(n) = n^7/40320 - n^6/1440 + 23/2880*n^5 - 7/144*n^4 + O(n^3). - Charles R Greathouse IV, May 31 2026
EXAMPLE
For n=10, there are a(10)=5 order 8 subsets of Z/10Z with sum equal to 0 mod 10.
PROG
(PARI) a(n)=(n^7-28*n^6+322*n^5-1960*n^4+(6874-n%2*105)*n^3+(-14392+n%2*1260)*n^2+42031616354777654719521424\1685^(n%8)%1685*12*n+5040*[-8, -1, -2, -1, -4, -1, -2, -1][n%8+1])/40320 \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Xavier Roulleau and David Broadhurst, Feb 19 2025
STATUS
approved
