Find all positive integers $n$ for which the number $\frac{n^{3n-2}-3n+1}{3n-2}$ is whole.
HIDE: EDIT: In the original problem instead of whole we search for integers, so with this change $n=1$ will be a solution.Problem
Source: IX International Festival of Young Mathematicians Sozopol, Theme for 10-12 grade
Tags: number theory
22.09.2018 20:51
We claim that no such positive integers exist. First, $gcd(n,3n-2)=gcd(n,2)=1,2$ If $gcd(n,2)=2\implies$ $n$ is even. So, $3n-2$ is even. But $n^{3n-2}-3n+1$ is odd, which implies $3n-2\nmid n^{3n-2}-3n+1$. Thus $n$ must be odd. And, $gcd(n,3n-2)=gcd(n,2)=1$. $n^{3n-2}-3n+1=n^{3n-2}-3n+2-1$ Thus, $3n-2\mid n^{3n-2}-1$ Which implies $\varphi(3n-2)\mid 3n-2$ Let $3n-2=\prod_i p_i$ Note, that $3n-2$ is odd, so $p_i\neq 2$. $\varphi(3n-2)\mid 3n-2\implies \prod_i (p_i -1)\mid \prod_i p_i$ But this is not possible since $\prod_i p_i$ is odd and $\prod_i (p_i -1)$ is even. Thus, $n=1$. But, then the given expression equals $-1$. Thus, there are no solutions.
22.09.2018 20:57
We have $3n-2 \mid n^{3n-2}-1$. If $n>1$, let $p$ be the least prime divisor of $3n-2=m$. Note that if $p \mid n$ then $p \mid 3n-m \implies p=2 \implies 2 \mid n$, which is a contradiction since $3n-2$ would be even and $n^m-1$ odd. Suppose that $\text{gcd}(p-1,m)>1$. So $\exists \ q$ prime such that $q \mid m$ and $q \mid p-1 \implies q<p$, but it contradicts the minimality of $p$. Then $p \mid n^m-1$ and $p \mid n^{p-1}-1 \implies p \mid n^{\text{gcd}(p-1,m)}-1=n-1$. So $p \mid m-3(n-1)=1$, a contradiction. Therefore $n=1$, but in this case $\frac{n^{3n-2}-3n+1}{3n-2}=-1$ is not a whole number, so there is no such $n$.
22.09.2018 23:52
My mistake. I am sorry! It seems that I swapped the definitions for a whole number and an integer. So $n=1$ is a solution to the original problem. But your solutions are correct for the changed problem I have written here.