3

This is something I noticed while playing with some factors of repunits.

For $a > 0$, $b > 0$, $p \neq 3$ or $p$ different of a multiple of $3$, $gcd(a,b) = 1$ and $a > b$, how to prove than $N = ((a^2)^{p}+(ab)^p+(b^2)^{p})/(a^2+ab+b^2)$ is prime only if $p$ is prime ?

This question is quite similar to Why is $a^n - b^n$ divisible by $a-b$? but I don't know how to prove it and even this is true or not but I tried with some number and each time $p$ was prime when $N$ is prime.

Aurel-BG
  • 121
  • 2
    Perhaps I am missing something but with $a=2$, $b=3$, and $p=3$ you get the numerator of $7033$ and denominator of $19$ so $N$ isn't even an integer. Should I take your question to mean "Assuming $\frac{a^{2^p}+(ab)^p+b^{2^p}}{a^2+ab+b^2}$ is prime, prove $p$ to be prime?" – QC_QAOA Sep 16 '24 at 15:49
  • Thanks, I forgot to say than p must be different of 3 and yes this is what I want, I don't know if it's true or not – Aurel-BG Sep 16 '24 at 15:50
  • 1
    The numerator is very large...how far have you searched? – lulu Sep 16 '24 at 16:01
  • Non-integers for small $(a,b,p) = {}$: $(1,2,5)$, $(1,3,5)$, $(1,4,5)$, $(2,1,5)$, $(2,3,5)$, $(2,3,7)$, $(3,1,5)$, $(3,2,5)$, $(3,2,7)$, $(3,4,5)$, $(3,4,7)$, $(4,1,5)$, $(4,3,5)$, $(4,3,7)$... Non-primes for $a \in [1,4]$, $b \in [1,4]$, and $p \in {5,7}$. (Note that $a = b = 1$ gives the non-prime $1$, which might not be interesting.) $(2,2,5)$ gives an even number, divisible by $2^8$. $(3,3,7)$ gives a number divisible by $3^{11}$ and three more primes. – Eric Towers Sep 16 '24 at 16:15
  • @lulu, I tried until $a = 2$ to $12$, $b = 1$ to $a-1$ with $gcd(a,b) = 1$ and $p = 1000$ with PARI GP – Aurel-BG Sep 16 '24 at 16:16
  • Did you forget to add $\gcd(a,b)=1$ as a condition to the posted question? In that searched range, what was the percentage of integers? – lulu Sep 16 '24 at 16:17
  • Yes I will add it, sorry for that ! by the way, $p$ must be different of $3$ and $a > b - 1$ – Aurel-BG Sep 16 '24 at 16:18
  • Here's the PARI GP code :
    for(n=2,31, for(m=1,n-1, for(p=1, 1000, if(gcd(n,m)==1&&p%3!=0&&ispseudoprime(((n^2)^p+(mn)^p+(m^2)^p)/(n^2+nm+m^2)), print(n,",",m,",",p,",",isprime(p))))))
    – Aurel-BG Sep 16 '24 at 16:32
  • 3
    Is the numerator meant to be $a^{2^p}+(ab)^{2^{p-1}}+b^{2^{p-1}}$? Or may be $$a^{2p}+(ab)^p+b^{2p}?$$ When it is homogeneous there could be a better chance of getting an integer as the quotient? – Jyrki Lahtonen Sep 16 '24 at 16:57

1 Answers1

5

Let $\omega=\exp(2\pi i/3)$. We have $$(a-b)(a-\omega b)(a - \omega^2 b) = a^3-b^3 = (a-b)(a^2 +ab + b^2),$$ so in particular, $(a-\omega b)(a - \omega^2 b) = a^2 + ab + b^2 $.

Let $n>1$ be indivisible by $3$, and $a>b\geq 1$. Then, $$\frac{a^{2n}+a^nb^n+b^{2n}}{a^2+ab+b^2}=\frac{(a^n-\omega b^n)(a^n-\omega^2 b ^n)}{(a-\omega b)(a -\omega^2 b)}=\frac{(a^n-(\omega b)^n)(a^n-(\omega^2 b )^n)}{(a-\omega b)(a -\omega^2 b)} $$ where in the last step we use the fact that $\omega^n,\omega^{2n}$ equals $\omega,\omega^2$ in some order (this would not be the case if $n$ were divisible by $3$). If $m\mid n$, then in the ring $\mathbb{Z}[\omega]$ of Eisenstein integers, we have $(a^m-(\omega b)^m)\mid (a^n-(\omega b)^n)$, and similarly with $\omega^2$ instead of $\omega$. Thus, $$\frac{(a^m-(\omega b)^m)(a^m-(\omega^2 b )^m)}{(a-\omega b)(a -\omega^2 b)} \ \left\vert\ \frac{(a^n-(\omega b)^n)(a^n-(\omega^2 b )^n)}{(a-\omega b)(a -\omega^2 b)}\right . \tag{*}$$ Initially, we only know $(*)$ to be true in $\mathbb{Z}[\omega]$. However, both the LHS and RHS are real, so their ratio is a real element of $\mathbb{Z}[\omega]$. Since the real elements of $\mathbb{Z}[\omega]$ are precisely the integers, $(*)$ is also true in $\mathbb{Z}$. Now if $m$ is a non-trivial divisor (i.e. $1<m<n$), then $$a^2+ab+b^2<a^{2m}+a^mb^m+b^{2m}<a^{2n}+a^nb^n+b^{2n},$$ so the LHS of $(*)$ is a non-trivial divisor as well. It follows that $\frac{a^{2n}+a^nb^n+b^{2n}}{a^2+ab+b^2}$ can only be prime if $n$ is prime.

EDIT: An outline of a generalization. The key points of the proof above are

  • We have a bivariate polynomial $P\in\mathbb{Z}[x,y]$ given by the homogenization of a univariate polynomial $p\in\mathbb{Z}[x]$ (that is, $P(x,y)=y^{\deg p}p(x/y)$)
  • The roots of $p$ are distinct and given by a set $S$ of $k$th roots of unity
  • We consider the primality of $P(a^n,b^n)/P(a,b)$ for $a>b\geq 1$ and $n$ such that $x\mapsto x^n$ permutes $S$
  • We find that $P(a^m,b^m)/P(a,b)\mid P(a^k,b^k)/P(a,b)$ in the cyclotomic integers $\mathbb{Z}[\zeta]$ for $m\mid k$, where $\zeta=\exp(2\pi i /k)$
  • We translate this to a factorization in $\mathbb{Z}$, using the fact that $\mathbb{Q}\cap\mathbb{Z}[\zeta]=\mathbb{Z}$
  • We use the fact that $p(x)$ is increasing for $x>1$ to show that $1<m<k$ implies $P(a,b)<P(a^m,b^m)<P(a^n,b^n)$
  • Hence $P(a^n,b^n)/P(a,b)$ is prime only if $n$ is prime

To generalize, we need the following

  • $p(x)$ is increasing for $x>1$
    • This is given by the Gauss-Lucas theorem, which guarantees that the zeroes of $p'$ lie in the unit disk.
  • $\mathbb{Q}\cap\mathbb{Z}[\zeta]=\mathbb{Z}$
    • The minimal polynomial of $\zeta$ is the cyclotomic polynomial $\Phi_k(x)\in\mathbb{Z}[x]$. By Euclidean division by $\Phi_k$, each element of $\mathbb{Z}[\zeta]$ is uniquely given as $r(\zeta)$ for an $r$ with $\deg(r)<\deg(\Phi_k)=\phi(k)$, and vice versa. Thus, $1,\ldots,\zeta^{\phi(k)-1}$ forms a basis of $\mathbb{Z}[\zeta]$ as a $\mathbb{Z}$-module. If the quotient module $\mathbb{Z}[\zeta]/\mathbb{Z}$ contains a nontrivial element $q\in \mathbb{Q}/\mathbb{Z}$ with denominator $m$, then $mq\in\mathbb{Z}$ is a $\mathbb{Z}$-linear combination of $\zeta,\ldots,\zeta^{\phi(k)-1}$, which contradicts the fact that $1,\ldots,\zeta^{\phi(k)-1}$ forms a basis of $\mathbb{Z}[\zeta]$. Hence $\mathbb{Q}\cap\mathbb{Z}[\zeta]=\mathbb{Z}$.

The question is then, for which $p$ do the first two points hold ($p$ has integer coefficients, zeroes are roots of unity)? Well, if $s$ lies in $S$, then so must all of its Galois conjugates. It follows that $S$ can be partitioned into Galois conjugacy classes, so $p$ factors as a product of cyclotomic polynomials $\Phi_d$ with $d\mid k$. If this factorization yields two or more factors, then $P(a^n,b^n)/P(a,b)$ is clearly composite. Thus, the only interesting case is when $p(x)=\Phi_k(x)$. Then, the $n$ of interest are precisely those coprime to $k$ ($n$ is a representative of $\text{Gal}(\mathbb{Q}(\zeta)/\mathbb{Q})\cong (\mathbb{Z}/k\mathbb{Z})^\times$). Thus, we get the following generalization:

Generalization: If $n,k>1$ are coprime, $a>b\geq 1$ are coprime, and $P(x,y)=y^{\phi(k)}\Phi_k(x/y)$, then $P(a^n,b^n)/P(a,b)$ is prime only if $n$ is prime.

EDIT 2: There is a much simpler argument for why $\mathbb{Q}\cap\mathbb{Z}[\zeta]=\mathbb{Z}$. Since $\zeta$ is an algebraic integer, so are all the elements of $\mathbb{Z}[\zeta]$. On the other hand, the only algebraic integers in $\mathbb{Q}$ are those in $\mathbb{Z}$.

Jacob
  • 3,319
  • 15
  • 27