Letp be an odd prime number. Determine the number of tuples (a1,a2,...,ap) of natural numbers with the following properties:
1) 1≤ai≤p for all i=1,...,p.
2) a1+a2+⋅⋅⋅+ap is not divisible by p.
3) a1a2+a2a3+...+ap−1ap+apa1 is divisible by p. number theorydividesdivisible