The following question is equivalent to a problem in group theory. 
Let $ p > 13$ be a prime number distinct from 239. Let $ a=(p^2+1)/2 $. Is there any prime divisor $r$ of $a$ such that $r\mid a$ or $r^2\mid a$ and specially $ r^3 $ does not divide $a$ and also $(1+kr)\not\mid a$, for each nonzero $k$?


We check it for many primes as the computer allows us. Always we get the positive answer. 
Thanks for your answers.



on the prime divisors of $(p^2+1)/2 $
If I understand correctly, there are primes $p$ for which $r$ with yours properties doesn't exist.


The smallest I found is $p=241727$ and $a=5 \cdot 13 \cdot 17 \cdot 29 \cdot 37 \cdot 41 \cdot 601$.


For each prime factor $r$ of $a$ there exist divisor $d$ of $a$
such that $d \equiv 1 \pmod{r}$, $d \ne 1$, which shows $1+kr \mid a$.


