Cardinality of a subset of $S_{p-1}$. Let $p$ be an odd prime and $S_{p-1}$ the symmetric group of degree $p-1$. Let's consider the subset:
$$X:=\{\sigma\in S_{p-1}\mid P(1)\wedge P(2)\wedge P(3)\}$$
where:

*

*$P(1)$: $\sigma(i)\ne i$ for every $i=1,\dots,p-1$;

*$P(2)$: $\left|\sigma\right|\mid p-1$;

*$P(3)$: if $\sigma=(i_{11}\dots i_{1s_1})\dots(i_{r1}\dots i_{rs_r})$ is the disjoint cycle decomposition of $\sigma$, then $\forall j=1,\dots,r$:
$$\sum_{k=1}^{s_j}i_{jk}\equiv 0\pmod p \tag 1$$
So, in particular, every $(p-1)$-cycle lays in $X$. On the other hand, if $\sigma\in X$ is not a $(p-1)$-cycle, then its cycle structure $(l_1,\dots,l_r)$ is such that $l_1+\dots+l_r=p-1$, with every cycle's length $2\le l_j\le\frac{p-1}{2}$ and $\operatorname{lcm}(l_1,\dots,l_r)\mid p-1$. For instance, if $p=7$, then elements of $X$ are, e.g.: $\sigma=(123456)$, $\sigma=(16)(25)(34)$, $\sigma=(124)(356)$.
So, my question is: what's the cardinality of $X$, for a given $p$?

Edit. I had conjectured that the disjoint cycles would have all be of the same length, but $\sigma=(1,12)(2,11)(3,10)(49)(5678)$ is a counterexample for $p=13$.
Edit#2. The connection between the set $X$ and $\Bbb Z_p^*$, recalled by @kabenyuk's comment, was expected actually, considered the context where this question popped up, namely: Let's assume to be known that $\left|\operatorname{Aut}(C_p)\right|=p-1$; if we set $\operatorname{Aut}(C_p)=\{Id_{C_p},\varphi_1,\dots,\varphi_{p-2}\}$, then it turns out that every $\varphi_i$ is of the form:
\begin{alignat}{1}
\varphi_i(1)&=1 \\
\varphi_i(a^j)&=a^{\sigma_i(j)}
\end{alignat}
where $\pmb{\sigma_i\in X}$. My question here was meant as an intermediate step to finally prove that some of the $p-2$ permutations $\sigma_i\in X$ must be a $(p-1)$-cycle, so as to have a "$\Bbb Z_p^*$-free" proof of $\operatorname{Aut}(C_p)\cong C_{p-1}$. But I see that this result seems really inseparable from the notion of $\Bbb Z_p^*$.
 A: I wrote a small GAP program to determine the list of elements satisfying the condition (not listing all $p-1$-cycles):
Condition:=function(p)
local sn,dom,cl,set,i,j,z,dc,a,cnt,orb;
  dom:=[1..p-1];
  # Z_p* action
  z:=Group(PermList(List(dom,x->Int(Z(p)*x))));
  sn:=SymmetricGroup(p-1);
  cl:=ConjugacyClasses(sn);
  cl:=Filtered(cl,x->((p-1) mod Order(Representative(x))=0)
    and ForAll(dom,y->y^Representative(x)<>y));
  set:=[];
  for i in cl do
    dc:=DoubleCosetRepsAndSizes(sn,Centralizer(i),z);
    Print("Testing ",Size(i)," Elements, ",Length(dc)," double cosets\n");
    cnt:=0;
    for j in dc do
      a:=Representative(i)^j[1];
      if ForAll(Cycles(a,dom),c->Sum(c) mod p=0) then
        orb:=Orbit(z,a);
        cnt:=cnt+1;
        Append(set,orb);
      fi;
    od;
    if cnt>0 then
      Print("Type ",Representative(i)," gives ",cnt," solutions\n",
        "e.g. ",set[Length(set)],"\n");
    fi;
  od;
  return set;
end;

and we get solutions for primes: $p=2:0$, $p=3:1=2!+0$, $p=5:7=3!+1$, $p=7:125=5!+5$, $p=11:369217=9!+6337$, $p=13: 40550519=11!+633719$.
Note that for these primes every partition satisfying conditions 1 and 2 gives rise to solutions for condition 3.
