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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A232664 Number of permutations of order n-1 such that no proper partial sum is zero modulo n. 1

%I

%S 1,1,2,4,16,56,408,2376,19920,156096,1711680,16851072,216434304,

%T 2557907712,38102969088

%N Number of permutations of order n-1 such that no proper partial sum is zero modulo n.

%H K. Gaitanas, <a href="http://mathoverflow.net/questions/149998/avoiding-multiples-of-p">Avoiding multiples of p</a>, MathOverflow.

%F For n>1, a(n) = A232663(n) / (n-1-(n mod 2)).

%e For n=5, the permutation (1,2,4,3) has proper partial sums 1, 1+2=3, 1+2+4=7, neither of which is zero modulo n. The number of such permutations is a(5)=16.

%o (PARI) { a(n) = my(r=0,q,s,g); for(i=1,(n-1)!, q=numtoperm(n-1,i); s=Mod(0,n); g=1; for(j=1,n-2, s+=q[j]; if(s==0,g=0;break)); r+=g); r }

%K nonn,more

%O 1,3

%A _Max Alekseyev_, Nov 27 2013

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 December 1 04:32 EST 2021. Contains 349426 sequences. (Running on oeis4.)