20

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 ?

Peter
  • 78,494
  • 15
  • 63
  • 194
  • 1
    According to my calculations , no further prime $g(n)$ upto $n=31\ 700$ – Peter Apr 26 '22 at 20:07
  • 2
    Oh good, I won't try to brute force search further. In fact pari was unhappy about $n=8111$. Sadly, I'm not sure I see anything likely in the way of proof--this is a very Fermat's last theorem-ish Diophantine, which suggests some fun times with elliiptic curves. – Eric Snyder Apr 26 '22 at 21:29
  • we have: $n=17\rightarrow 3^{17}+5^{17}+7^{17}\equiv(3+5+7=15)\bmod 17=17k+15$ and $(17, 15)=1$, that is $p$(here 17) and $k$ must not be divisible by $3$ and $5$.We may conclude that for sure n must prime. – sirous Apr 27 '22 at 11:12
  • 1
    @sirous This only shows that $17$ does not divide $g(17)$. What we need is a factor of , say , $g(341)$ to show that $n$ must be prime (and of course a similar factor for other composites). – Peter Apr 27 '22 at 11:21
  • 1
    According to my calculations, no further (probable) prime $g(n)$ occurs upto $n=60\ 000$. The expected number of primes occuring with a composite $n$ upto $10^6$ is about $1$. So, if there is no reason why this cannot be prime with composite $n$, a counterexample is still likely. – Peter Apr 28 '22 at 07:48
  • By the way, $f(n)$ is prime for $n=0,2,10,14,24,26,126,514,522,1658,13758$ and no other $n\le 50\ 000$ according to my calculations. Another prime of this form would also be appreciated. – Peter Apr 28 '22 at 07:55
  • 2
    Another $n$ for which $f(n)$ is prime is [$77194$](https://oeis.org/A160773). – BillyJoe Apr 28 '22 at 18:43
  • @BillyJoe Thank you very much ! – Peter Apr 29 '22 at 10:15
  • Why are $f(6n+3)$ and $f(10n+5)$ divisible by $3$ and $5$ respectively? – Geoffrey Trang Apr 30 '22 at 14:08

3 Answers3

6

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.

gnasher729
  • 8,131
  • 16
  • 33
  • According to the $10^4$-candidates I created , the expected number of primes with composite exponent is about $1$ , if we go upto $10^6$. Still a long way to go. Note that the small prime factors $2,3,5$ we can rule out increase the chance for a prime. – Peter Apr 30 '22 at 12:06
  • The additional prime found by the above user can let us hope that we are lucky again and find a prime far below the expected point. – Peter Apr 30 '22 at 12:15
  • 1
    According to my search , there is no example with a composite $n\le 10^5$. Based on this lower bound, upto $n=5\cdot 10^6$ the expected number of solutions is about $1.4$ and we have to go upto about $1.7\cdot 10^6$ to have an expected number of $1$ solutions. – Peter May 03 '22 at 09:00
  • I agree that this is the crucial point: the prime values are not unexpectedly rare for composite $n$. On the other hand, for prime $n>5$, we know the value is not divisible by $2$, $3$, or $5$, so the density of primes will be $15/4$ times that of random numbers of similar size. In that respect, $(1^n+3^n+5^n)/3$ for prime $n$ shows a greater abundance of prime values. – Einar Rødland May 04 '22 at 20:58
  • @EinarRødland Note that I already sieved out the prime factors upto $10^5$ , so this won't increase the expectation further. What I would however need is a doublecheck for the range upto $n=10^5$ because it is so time-consuming that I won't be able to do it myself. – Peter May 05 '22 at 06:58
4

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$.

Einar Rødland
  • 8,722
  • 18
  • 33
  • 1
    Very similar to what I thought about this phenomenon (+1). That cases with no small factor exist makes it likely that there is no forced factor (algebraic, aurifeuillan or whatsoever), but it could be that small prime factors occur more often if the exponent is composite. It might be worth to analyze this further. According to my search, there is no counterexample upto $80\ 700$ (I did not check all the prime cases upto this limit). – Peter Apr 30 '22 at 10:39
1

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.

Edward Porcella
  • 2,641
  • 2
  • 9
  • 15
  • See my answer for counter-examples to some alternative functions. Eg $(1^n+3^n+5^n)/3$ is also prime for $n=201=7\cdot 43$. – Einar Rødland May 03 '22 at 21:25
  • Do you mean $n=301$? I found counter-examples for some alternative functions but did not find one for consecutive odd integers until my above example. I failed to notice yours, but yes, for $n=301=7\cdot43$, $g(n)$ is a $210$-digit prime. Good find. – Edward Porcella May 03 '22 at 22:19
  • Yes, should have been 301. Fixed in the answer too. For $(5^n+7^n+9^n)/21$ there's $n = 961 = 31^2$ and $1027 = 13\cdot 79$. – Einar Rødland May 03 '22 at 22:24
  • Only looking for small examples does not show that some expression with $n$ in the exponent can only be prime, if $n$ is prime. This is only possible, if we find some forced factors , for example algebraic factors. Otherwise the only way is to find a prime because a non-constructive proof that there is none will be out of reach. – Peter May 04 '22 at 06:31