show that $$ p\mid n \implies \exists (a,b)\in\mathbb{Z}^2 \quad an+b(p-1)=1$$ with p is the least prime dividing
my attempts
Indeed, Let $d=n\wedge (p-1)=gcd(n,p-1)$ and we try to show that $d=1$
since $d=n\wedge (p-1)$ then $d/n \implies d \leq p-1$
if $d\neq 1$ then d has prime divisor $q$ such that $q\mid (d\mid n)$
Presumably $\,p\,$ is the least prime dividing $\,n,\,$ hence $\,\gcd(n,p-1)=1\,$ so Bezout's identity for said gcd yields the desired equation.
Notice $\,n\,$ and $\,p\!-\!1\,$ are coprime because they have disjoint sets of prime factors: by hypothesis $\,n\,$ has all prime factors $\,\ge p\,$ but $\,p\!-\!1\,$ has all prime factors $\le p\!-\!1$