A173499 Number of sequences of length n with terms from {0,1,...,n-1} such that the sum of terms is 0 modulo n and the i-th term is not i.
0, 0, 2, 20, 204, 2604, 39990, 720600, 14913080, 348678440, 9090909090, 261535698060, 8230246567620, 281241170407092, 10371206370520814, 410525522232055664, 17361641481138401520, 781282469559318055056, 37275544492386193492506, 1879498672877297909667780, 99864380952380952380952380
Offset: 1
Keywords
Links
- ArtOfProblemSolving forum, 45th IMO Team Selection Test Lincoln, Nebraska
Crossrefs
Cf. A173500
Programs
-
Python
for n in range(1, 33): print((n-1)**n // n, end=',') # Alex Ratushnyak, Aug 04 2012
Formula
For odd n, a(n) = ((n-1)^n-n+1)/n.
For even n, a(n) = ((n-1)^n-1)/n.
a(n) = floor((n-1)^n / n). - Alex Ratushnyak, Aug 04 2012
Extensions
More terms from Michel Marcus, Apr 30 2025