Is $\frac{3^n+5^n+7^n}{15}$ only prime if $n$ is prime?

696 Views Asked by At

Let $f(n)=3^n+5^n+7^n$

It is easy to show that $\ 15\mid f(n)\ $ if and only if $\ n\ $ is odd.

I searched for prime numbers of the form $g(n):=\frac{3^n+5^n+7^n}{15}$ with odd $n$ and found the following $n$ leading to a prime number : $$7,17,61,71,457,8111$$ All those numbers are prime numbers.

Can we show that this is a necessary condition ?

The cases $3\mid n$ and $5\mid n$ are clear because $\frac{3^n+5^n+7^n}{15}$ is divisble by $\ 3\ $ and $\ 5\ $ respectively, but what about $\ g(77)\ $ which smallest prime factor is $\ 463\ $ and other cases ?

3

There are 3 best solutions below

1
On BEST ANSWER

Here are some extended comments:

We may look at similar functions $$ F_{u,v,w; d}(n) = \frac{u^n+v^n+w^n}{d} $$ to see if they have similar properties, where $d$ should be selected so as to make it an integer for odd $n$, but remove any common factor. The original question regards $F_{3,5,7;15}$.

Looking at $F_{1,3,5;3}(n)$ for odd $n$, the result is prime for $n=1$, $5$, $13$, $17$, $29$, $41$, $113$, $193$, $509$, $617$, $3457$, but also for $n=301=7\cdot 43$, and probably for $n=9197=17\cdot 541$ (had to resort to a probabilistic prime test).

We may also look at alternatives, testing all $n<1000$, some up to $n<10000$ (may be probabilistic prime test for large $n$):

  • $F_{1,3,7;1}(n)$ is prime for $n=1,13,17,1487$, but also for $49=7^2$, $815=5\cdot 163$, and $2317=7\cdot 331$;

  • $F_{1,5,9;15}(n)$ is prime for $n=7,13,17,61,1223$, but also for $n=913=11\cdot 83$, $2773=47\cdot 59$, $2951=13\cdot 227$, $7399=7^2\cdot 151$;

  • $F_{1,-3,5;3}(n)$ is prime for $n=29,619$, but also for $121=11^2$, $329=7\cdot 47$, and $n=5491=17^2\cdot 19$;

  • $F_{-1,-3,5;1}(n)$ is prime for $n=3,7,17,29,337$, but also for $21=3\cdot 7$, $33=3\cdot 11$, $339=3\cdot 113$, $721=7\cdot 103$.

It seems clear that composite $n$ tend to make $g(n)$ more composite than prime $n$, and similarly for some alternative $F$ functions. Understanding why this is the case would be very interesting. Perhaps that might also lead to some heuristic/probabilistic argument in favour of the assumption that $g(n)$ having no prime values for composite $n$.

However, my suspicion is that there may be some composite $n$ which makes $g(n)$ prime, but potentially for very large $n$.

5
On

If n is even then $3^n + 5^n + 7^n$ is not divisible by 15.

If n is divisible by 3 or 5 then $(3^n + 5^n + 7^n) / 15$ is divisible by 3 or 5.

So you are asking: Is there an n, not prime, not divisible by 2, 3 or 5, such that $(3^n + 5^n + 7^n) / 15$ is prime?

For given M, the number of candidates for n is about M * (4/15 - log M). The probability that $(3^n + 5^n + 7^n)/15$ is prime is about $1 / \log (7^n / 15)$$1 /(1.95 \cdot n)$.

The sum of 1/n is about ln M, we multiply this by $4 / (15 * 1.95)$ giving about $\ln M / 7.3$. According to this very inaccurate calculation, we can expect one prime for n ≤ 1,500 and two primes for n ≤ 2,200,000. But an expected value of 1 or 2 means it is absolutely possible and not particularly unlikely that there are no primes in that range.

Unless you have a mathematical proof otherwise, I would assume that there is such an n, actually an infinite number of such n's, but an exhaustive search for n up to 2,000,000 or even 4 billion without finding one doesn't mean much. Obviously the heuristics can be improved a lot.

4
On

I. Prime $n$ seems a necessary condition for prime $g(n)$, not only for $f(n)=3^n+5^n+7^n$, $g(n)=\frac{3^n+5^n+7^n}{15}$, but also for similar cases.

E.g. taking the trio of odd integers less than the posted case, for $f(n)=1^n+3^n+5^n$, with$$g(n)=\frac{1^n+3^n+5^n}{3}$$ and $n<100$, $g(n)$ is prime only for prime $n=5, 13, 17, 29, 41$: $$1123$$$$407432483$$$$ 254356197763$$$$62088194517824356003$$$$15158245041706469424307579843$$The next prime $g(n)$ is for prime $n=113$.

Likewise for some increasing trios of consecutive odd integers.$$\begin{array}{cccc}\text{f(n)} & \text{g(n)} & n & \text{prime g(n)}\\ \hline5^n+7^n+9^n & \frac{f(n)}{21} & 5 & 3761\\- & - & 43 & 5131181926598620870059044278576189362457\\ 7^n+9^n+11^n & \frac{f(n)}{9} & 1 & 3\\- & - & 11 & 35407784107\\- & - & 13 & 4129051886963\\- & - & 17 & 58039648968105283\\9^n+11^n+13^n & \frac{f(n)}{33} & 5 & 17921\\- & - & 7 & 2636929\\- & - & 29 & 6155428662438784503568282263041\\- & - & 41 & 142437341620935541845482699492428865265971201\\11^n+13^n+15^n & \frac{f(n)}{39} & 11 & 275057126257\\- & - & 37 & 844287359404869502215865700763611372145761\\- & - & 67 & ---\\\end{array}$$For the last $n=67$, prime $g(n)$=$$ 161094059489831593214989598447345339537628 222953633116135188147969918645655217$$

II. But taking non-consecutive odd integers, e.g. $f(n)=1^n+3^n+7^n$, where $g(n)=f(n)$ since $1+3+7=11$ is not divisible by $3$, we find $g(n)$ is prime for $n=1, 13, 17$, but also for composite $n=49$.

Again, taking three consecutive integers instead of three consecutive odd integers, composite $n$ can yield prime $g(n)$. E.g. for $f(n)=1^n+2^n+3^n$, where $g(n)=\frac{f(n)}{12}$ for odd $n>3$, we get prime $g(n)$:$$3$$$$23$$$$193$$$$133543$$$$10772603$$$$7845963953$$$$ 858420955076202578510080530923$$$$176741262253776179925474237053751128366837273$$when $n=3, 5, 7, 13, 17, 23, 65, 95$.

III. If prime $g(n)$ for composite $n$ are as elusive for the trios of consecutive odd integers, sampled above for odd $n<100$, as they are found to be for the posted $\frac{3^n+5^n+7^n}{15}$, can the conjecture then be more generally put: If $f(n)$ is the sum of like odd powers of three consecutive odd integers, and $g(n)$ is $f(n)$ cleared of factors common to all $f(n)$, and $g(n)$ is prime, then $n$ is prime?

However, this is not universally true. In the posted case the three consecutive odd integers are all prime, and in the nearby cases considered above at least one of the integers is prime. Probing the possible relevance of this by examining $g(n)$ for the smallest trio of consecutive odd integers all composite:$$g(n)=\frac{91^n+93^n+95^n}{93}$$we find prime $g(35)$=$$30301372938052318586648696678367793606476198590474743450180085922931$$So if $g(n)$ is indeed never prime for $\frac{3^n+5^n+7^n}{15}$, then the cause seems to lie in something more specific than the behavior of like powers of consecutive odd integers.