login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3

%I

%S 0,0,2,20,204,2604,39990,720600,14913080,348678440,9090909090,

%T 261535698060,8230246567620,281241170407092,10371206370520814,

%U 410525522232055664,17361641481138401520,781282469559318055056

%N 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.

%H ArtOfProblemSolving forum, <a href="http://www.artofproblemsolving.com/Forum/viewtopic.php?t=31946">45th IMO Team Selection Test Lincoln, Nebraska</a>

%F For odd n, a(n) = ((n-1)^n-n+1)/n.

%F For even n, a(n) = ((n-1)^n-1)/n.

%F a(n) = floor((n-1)^n / n). - From _Alex Ratushnyak_, Aug 04 2012.

%o (Python)

%o for n in range(1, 33):

%o print((n-1)**n // n, end=',')

%o # from _Alex Ratushnyak_, Aug 04 2012

%Y Cf. A173500

%K nonn

%O 1,3

%A _Max Alekseyev_, Feb 20 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 09:06 EDT 2021. Contains 347597 sequences. (Running on oeis4.)