what primes divide $ 1963^{1965}-1963 $ The task is following..

which of the prime numbers $$ 2,3,5,7,11,13,109,151,491 $$
divide
$$ z:= 1963^{1965}-1963 $$

Do you have a trick solving this task &quot;quick&quot;?
This is actually a task from a school competition in 1965.
Hint $ $ prime $\ p\mid a^n-a = a(a^{n-1}\!-1)\iff p\mid a\,$ or $\,p\mid a^{n-1}-1.\,$ For the latter, by Fermat

$\!\!\bmod p\!:\ a^{\large 4\cdot 491}\! \equiv 1 \equiv a^{\large p-1}\!\! \iff a^{\large (4\cdot 491,\,p-1)}\equiv1\!$ $\iff\! \bbox[5px,border:1px solid #c00]{a^{\large (4,\,p-1)}\equiv 1}\,$ by $\,\underbrace{491\nmid p\!-\!1}_{\textstyle p\le 491}$

So $\,\color{#90f}{p\mid a(a^4\!-\!1)}=\color{#0a0}{(a\!-\!1)a(a\!+\!1)}\color{#c00}{(a^2\!+\!1)}\,$. In the OP $\,a=1963\,$ and the listed  primes (except $7,11$) include all $\rm\color{#90f}{such}$ primes $p\le 491$  except for $61.\,$ Indeed very simple hand calculations show that $\,\bar a = 1963\bmod p \equiv  \color{#0a0}{0,\pm1}$ for all listed $p$ except $\,5,7,11$ and of those three only $\,5\,$ has $\,\color{#c00}{\bar a^2\equiv -1}$.

Remark $ $ This yields a closed form for the excluded primes: if $P$ is the product of all listed primes then the excluded primes are those in $\,P/(P,\color{#90f}{a^5\!-a}),\,$ which is $\,77 = 7\cdot 11\,$ here, indeed

$\qquad\qquad$
I think $$1963/13 =151$$ so 1963 is a multiple of 13. Then
$$(151)^{1965} * 13^{1965} - 13*151$$

Since both terms are multiple of 13 and 151 then the number is divisible by 13 and 151.