31

I try to find a balanced exercise on it with Desmos.

It seems we have:

$$\sum_{n=1}^{\infty}\frac{\gcd\left(1+n!,1+n^{2}\right)}{n!}\overset?=e$$

It seems non trivial as you can remark in replacing the square by a cube.

At first glance we can think it's problem with hidden rearrrangement theorem. Keeping in mind that I try the Riemann theorem on sequence and rearrangemnt without success. I keep in mind also the Wilson's theorem but cannot progress.

Notice I check the result with Wolfram Alpha.

How to (dis)prove it?

Thanks in advance for the help.

Side notes :

It's a strange idea but why calculus couldn't be here I mean ,and I think it's stupid but let's try that :

$$\gcd\left(\operatorname{floor}\left(\sqrt{2\pi n}\left(\frac{n}{e}\right)^{n}\right)+1,n^{2}+1\right)=^?1,n\in N^+$$

I think it's not very useful but why not ? I think that because it's really not the same problem but as Leibniz said knowledge is like path between some islands...

Ps: It's the floor function .

As second notes see also Bounds on the difference between the polylogarithm with negative base and the gamma function

Edit 04/02/2023

There is also where $x$ is a prime : $$\gcd(x!-x^x,1+x^2)=1$$

Then I was thinking to Green-Tao theorem but nothing consistent at all.

Edit 01/11/2023 :

We can represent (I suggest to show it) that :

$\exists a,r,n,m,u>0$ such that :

$$n!+1=\lfloor(1-a^r)^{-m}\rfloor=P$$

And :

$$n^2+1=\lfloor(1-a^r)^{-u}\rfloor=Q$$

Then it seems we have if $a$ is irrational and $P,Q$ have the prime factorization :

$$P=\prod_{i=1}^{v}p^{b_i}_{a_i},Q=\prod_{i=1}^{N}p^{c_i}_{d_i}$$

If so $\exists a_k,b_k,c_k,d_k$ such that $p^{b_k}_{a_k}$ is not in the prime factorization of $Q$ and vice versa .

A simple progress :

If $p$ is a prime having as last digit a $9$ and let $(p-1)^2+1=M$ then if $M$ have $9$ representation as sum of two square and $M^2$ have $4$ pythagorean triples then the conclusion follows and the conjecture is true .To understand that try an example like $p=269$

it seems also $p=883$ works too $25<882,37<882,29×29<882$ .Build it is rather easily .

Remark see https://publications.ias.edu/deligne/paper/357 and Can we invert these analogous "Dirichlet" series for GCD / LCM convolution?

Some works :

If $n,n+2$ is a twin pairs then :

$$4(n-1)!+4+n=0\operatorname{mod}(n(n+2))$$

Or $\exists k$ such that :

$$4(n-1)!+4+n=kn(n+2)$$

Or :

$$4(n-1)!+4=kn^2+(2k-1)n$$

It's divisible by four next we compare with :

$$kn^2+(2k-1)n=4q((n-1)^2+1)$$

Or :

$$(k-4q)n^2+(2k-1+8q)n-8q=0$$

If the discriminant is not a perfect square then the roots are irrational and so there is no solution in $q$:

$$2(10k^2-6k+1)$$

Is never a perfect square using $k$ is odd and (optional) the Hasse-Minkowski theorem so it's true that $\gcd((n-1)!+1,(n-1)^2+1)=1$ when $n,n+2$ are prime numbers if $10k^2-6k+1,(n-1)^2+1$ have no common prime factor .

We can enlarge with $$f\left(x,y\right)=\gcd\left(\left(10\cdot\left(2\operatorname{floor}\left(x\right)+1\right)^{2}-6\left(2\operatorname{floor}\left(x\right)+1\right)+1\right),\left(\operatorname{floor}\left(y\right)\right)^{2}+1\right)$$ Let introduce :

$$f\left(x,y\right)=\gcd\left(10\left(2x+1\right)^{2}-6\left(2x+1\right)+1,y^2+1\right)$$

Conjecture :

Let $n>1$ be a natural number then :

$$f(n^3,n)=1$$ Or : $$f(n^3,n)=\prod_{i=1}^{m}p_{a_i}$$

Where $p_{a_j}$ is a prime number here distinct

As a factorial cannot be a perfect power greater than one we delete some cases



I know that if $n-1$ finishes with a $8$ then $(n-1)^2+1$ divisible by $5$ and primes then I cannot go further

One example :

It's known that it can be write as a sum of square and squared as a sum of square too. The prime factorization of the number in the sum of square is not in $(n-1)^2+1$ but could be in $(n-1)!+1$ as the example $n=29$



To be continued.



In formalism it gives (all the unknow are positive integers and here $p,p+2$ are twin primes):

Theorem 1 :

Using Wilson's theorem for a prime $p$ Then $p$ is the smallest prime divisor of $(p-1)!+1$ if $p-1$ ends with a $8$ .

Theorem 2 :

If $p-1$ have as last digit $8$ then $(p-1)^2+1=P$ is divisible by $5$ .Then if $P=a^2+b^2,P^2=c^2+d^2$ then the integer factors in the prime decomposition of $a,b,c,d$ are not in the prime decomposition of $P$. Finally one of $a,b,c,d$ share a prime with $(p-1)!+1=K$ .This prime is the smallest divisor excepting $1$ of $K$.

Theorem 3 with condition of theorem 2 :

Recalling theorem 1 ,$p$ is the smallest divisor excepting $1$ of $K$. The smallest prime divisor of $K$ greater than $p$ is greater than the greater divisor of $P$ which is a prime number as divisor, if $P^2$ have $4$ representation as sum of two square .



Some materials for a proof :

Let says with the conditions of theorem 1,2,3 on $K$ and let $K$ have $C_p$ prime factor distinct then it seems we have :

$$C_p<\ln\left(\left(p-\frac{3}{2}\right)\ln\left(p\right)-p-1+\frac{1}{2}\ln\left(2\pi\right)\right)+\frac{1}{\sqrt{p}}$$

Using Ramanujan-Hardy theorem and Binet's formula .

For $P$ which have $T_p$ prime factor distinct it seems we have for $p$ sufficiently large :

$$T_p<\ln\left(\ln\left(\left(p-1\right)^{2}+1\right)\right)+\frac{1}{2}\sqrt{\ln\left(\ln\left(\left(p-1\right)^{2}+1\right)\right)}$$

Reference :

https://www.jstor.org/stable/2305816?origin=crossref

Barackouda
  • 3,879
  • 4
    The numerator is $2$ for $n = 1$ and $1$ otherwise, so the sum should be $e$, not $e + 1$. Did you mean for the sum to start at $n = 0$? – Travis Willse Nov 19 '22 at 11:18
  • @TravisWillse I make a mistake see https://www.wolframalpha.com/input?key=&i=%5Csum_%7Bn%3D1%7D%5E%7Binfinity%7D%5Cfrac%7B%5Cgcd%5Cleft%281%2Bn%21%2C1%2Bn%5E%7B2%7D%5Cright%29%7D%7Bn%21%7D-e – Barackouda Nov 19 '22 at 11:28
  • The rearrangement theorem only applies to alternating series that do not converge absolutely. Here, we only have positive values. – Peter Nov 19 '22 at 11:40
  • 1
    @Peter I assume they mean; because all values are positive, the series may be rearranged in any way whatsoever with no consequences – FShrike Nov 19 '22 at 11:53
  • 4
    @ErikSatie The computation you do in WA is misleading - note that it parses $\gcd(1+n!,1+n^2)$ as "PolynomialGCD", that is the GCD of the two expressions $1+n!$ and $1+n^2$. I don't know how WA parses it given the former is not a polynomial, but the result it gives is constant 1 – Wojowu Nov 19 '22 at 12:02
  • 1
    @Peter Whoops, I guess my calculator couldn't handle the large numbers! – FShrike Nov 19 '22 at 12:03
  • 2
    @Peter It is fairly clear that the gcd is 1 when $n^2+1$ is composite. How do you show this also holds in the prime case? – Wojowu Nov 19 '22 at 12:26
  • 1
    @Wojowu Now , as you ask , I realize that I might have been too fast with my conclusion and might have made a mistake. I have to think about it again. I could however find no counterexample with PARI/GP upto $n=3\cdot 10^5$. A good sign ! – Peter Nov 19 '22 at 12:35
  • 1
    @Wojowu Why is it clear in the case that $n^2+1$ is composite ? – Peter Nov 19 '22 at 16:01
  • 1
    @Peter I don't know if it's really "fairly clear", but basically: let $d_n$ be the $\gcd(\dots)$, and let $k_n$ be such that $n^2+1=k_n d_n$. If $d_n > 1$, then, by virtue of $\gcd(n!,n!+1) = 1$ and $d_n \mid n!+1$, we have: $d_n \geq n+1$, but that means we must have $k_n \leq n$ otherwise we'd get $n^2+1 = k_nd_n \geq (n+1)^2$, contradiction. However, $k_n \mid n^2+1$ and $\gcd(n^2,n^2+1) = 1$, so $\gcd(k_n,n^2)=1$, which gives $\gcd(k_n,n)=1$. We've established that $k_n \leq n$ before, thus this grants $k_n = 1$, and therefore $n^2+1 = d_n$. – Bruno B Nov 19 '22 at 17:25
  • 1
    Now, suppose $d_n$ is composite. Then it would have a prime factor $p$ lesser than $\lfloor\sqrt{d_n}\rfloor \leq \lfloor\sqrt{n^2+1}\rfloor = n$. Since $d_n \mid n!+1$, that would imply that $p \mid n!+1$, but $p \leq n$ provides $p \mid n!$, and so $\gcd(p,n!+1) = 1$ due to $\gcd(n!,n!+1) = 1$, contradiction, and thus $d_n$ is always either prime or $1$. Combined with the prior result, we obtain that $n^2+1$ composite implies $d_n = 1$. – Bruno B Nov 19 '22 at 17:25
  • @Peter I'm afraid I had a gap in my argument, it was essentially the same as Bruno's second post but for some reason I inferred the gcd must be 1 from $n^2+1\nmid n!+1$. – Wojowu Nov 19 '22 at 19:03
  • 3
    @BrunoB How do you get $k_n=1$ from $k_n\leq n$ and $\gcd(k_n,n)=1$? – Wojowu Nov 19 '22 at 19:03
  • @Wojowu Oh, well, you don't, my bad on that one... Thanks for noticing that gap! Back to the starting point I guess. – Bruno B Nov 19 '22 at 19:13
  • 2
    Is it worth to ask an extra question dealing with whether $\gcd(n^2+1,n!+1)$ is true for every integer $n\ge 2$ ? An interesting conjecture , I would say. – Peter Nov 20 '22 at 16:58
  • 4
    It is true for $n\le 10^6$ – Peter Nov 20 '22 at 17:28
  • 2
    Extended to $2\cdot 10^6$ – Peter Nov 21 '22 at 07:26
  • The search for random counterexamples did not reveal a result yet either. – Peter Nov 23 '22 at 22:31
  • might be useful to look at polynomials $x^2+1$ and $x(x-1)(x-2)\cdot\dots (x-n+1)$ and then show they are relatively prime over appropriate modulos but I am not so sure. – dezdichado Nov 24 '22 at 22:16
  • 7
    Some empirical observations: Most values of $n$ satisfy \begin{align}\gcd(1+n!,1+n^{2k})&=\begin{cases}2&\quad\text{if $n=1$}\1&\quad\text{otherwise}\end{cases}\quad\text{for all $k>0$}\\gcd(1+n!,1+n^3)&=\begin{cases}n+1&\quad\text{if $n+1$ is prime}\1&\quad\text{otherwise}\end{cases}\end{align} Higher even powers have the occasional miss; e.g. $\gcd(1+8!,1+8^{10})=61$. Higher odd powers display much less consistent behaviour. In PARI/GP, counterexamples for the even powers can be found through for(k=1,50,for(i=2,400,if(gcd(1+i!,1+i^(2*k))>1,print(i," ",gcd(1+i!,1+i^(2*k))," ",k)))). – TheSimpliFire Nov 24 '22 at 22:31
  • 3
    Note that if $\mathrm{gcd}(1+n!,1+n^2)\neq 1,$ then we must certainly have that $\mathrm{gcd}(1+n!,1+n^2)=p$ where $p$ is both the smallest prime divisor of $1+n!$ and the largest prime divisor of $1+n^2.$ So https://oeis.org/A051301 and https://oeis.org/A014442 might be useful. Notice the first comment in A014442 - that all elements must by Pythagorean primes. You will notice that (small) Pythagorean primes are hard to come by in A051301, and further notice that the $n$ being $1$ less than a Pythagorean prime (Wilson's guarantees $p$ is Pythagorean) are the only $n$ that result in small $p.$ – MandelBroccoli Nov 25 '22 at 08:03
  • 1
    Search limit extended to $4\cdot 10^6$, no counterexample, but I think there can well be a counterexample. What makes it difficult to find it is that there is at most one prime factor of $n^2+1$ larger than $n$ and this prime factor must divide $n!+1$ – Peter Nov 25 '22 at 11:47
  • 1
    @MandelBroccoli I know why $p$ is prime and is above $n+1$, and thus is the largest prime divisor of $n^2+1$ (since I showed it amidst my failed attempt above), but I don't quite see why it would need to be the smallest prime divisor of $n!+1$? Though maybe it's a simple obvious reasoning that I'm missing, I apologise in advance if that is the case. – Bruno B Nov 25 '22 at 15:59
  • @BrunoB good point. apologies i was not thinking clearly. – MandelBroccoli Nov 25 '22 at 17:05
  • 2
    However, you will see that this is still useful since if the smallest prime divisor of $1+n!$ is too large, then we have solved part of the problem already. – MandelBroccoli Nov 25 '22 at 17:08
  • In any case, I believe that the $n$ which are $1$ less than a Pythagorean prime will be hardest to figure out. – MandelBroccoli Nov 25 '22 at 17:12
  • We would need a method to compute $m!\mod n$ efficiently, where $m,n$ are large numbers and $n$ is prime to increase the search limit significantly. In particular, it is interesting whether $n^2+1\mid n!+1$ is possible for integer $n>2$. If $n>4$ is composite we have $n^2\mid n!$, but I could not make use of this to make any progress. – Peter Nov 26 '22 at 14:03
  • $\gcd\left(\operatorname{floor}\left(\sqrt{2\pi n}\left(\frac{n}{e}\right)^{n}\right)+1,n^{2}+1\right)=2$ for $n=3$, $11$, $13$, and $15$. – Alex Ravsky Nov 01 '23 at 11:10
  • The idea from your last edit looks overcomplicated and even if the conclusion holds for some $k$ then a priori it can be that $P$ and $Q$ have a common prime divisor distinct from $p_{a_k}$ and $p_{d_k}$. – Alex Ravsky Nov 01 '23 at 11:16
  • 1
    @AlexRavsky So we are agree . – Barackouda Nov 01 '23 at 12:23
  • @Peter If $n/2<m<n-1$ then we can compute $(n-m-1)!\pmod n$ and use the fact that by Wilson's Theorem $$-1\equiv (n-1)! \equiv m!(n-1)...(n-(n-m-1)) \equiv$$ $$ m!(-1)^{n-m-1}(n-m-1)!\pmod n.$$ – Alex Ravsky Nov 02 '23 at 09:15
  • https://math.stackexchange.com/questions/548027/prove-multinomial-coefficient-probability-theory – Barackouda Feb 19 '24 at 18:28
  • @Peter https://www.jstor.org/stable/2305816?origin=crossref is it interesting ? – Barackouda Apr 21 '24 at 13:28
  • We only need to prove: $$\prod _{k=0}^{n!} \left(1+\left(e^{-\frac{2 i \left(1+n^2\right) \pi }{1+n!}}\right)^k\right)=2$$ for $n>1$? – Mariusz Iwaniuk Apr 25 '24 at 09:38
  • @MariuszIwaniuk I don't know where it leads but see my simple progress. – Barackouda Apr 25 '24 at 10:26
  • https://math.stackexchange.com/questions/1507109/what-is-the-relation-between-gammaa-and-circles and circle quadrature – Barackouda Apr 25 '24 at 19:18
  • I might be misunderstanding something obvious, but isn't the claim just false, by comparison test with a sum of factorials? The $n=1$ term gives the value $2$, and all other are at least $1/n!$, so the LHS is at least $e$, and since nontrivial gcds do exist, it strictly exceeds $e$. – Chris H Apr 27 '24 at 23:21
  • @Chris the $2$ counts the $0$ term in the factorial too – Conrad Apr 27 '24 at 23:30
  • Yea, this sum starts $2+1/2+1/6+...$, and the usual sum for $e$ counts $1+1+1/2+1/6+...$, and we have an inequality on all later terms? – Chris H Apr 27 '24 at 23:46
  • @ChrisH yes, which means that the conjecture is equivalent to claiming that all the $\gcd$s involved are equal to $1$, which there is currently no counterexample for (you state nontrivial ones exist but Peter above has seemingly checked until $2 \cdot 10^6$ and hasn't found any) – Bruno B Apr 28 '24 at 07:57
  • Ahhh, my mistake, I thought I found a low counterexample. Thanks for clarifying! – Chris H Apr 28 '24 at 08:02
  • Example of $8$ sum of two square and 8 primitive of pythagorean triples as hypothenuse $$2377764$$ Where the conjecture is obvious. – Barackouda Apr 29 '24 at 10:24
  • just an algorithm
    1. Take a positive composite number :

    $$P=25×(4k+1)^2(4k'+1)$$

    Where $4k+1,4k'+1$ are primes numbers $k<k'$ can be write as one sum of two square and one time as hypotenuse of a Pythagorean triples .

    1. Check If the number $P$ have 9 representations as sum of square and $4$ as hypotenuse of a primitive Pythagorean triples .

    2. Now check If $\sqrt{P-1}=A$ Where $A$ is a positive integer

    If not come back to 1)

    1. Compare the divisors of $A^2+1$ and $A$ .If all the divisors are less than $A$ then the conjecture is obviously true .

    To see beyond the million

    – Barackouda Apr 29 '24 at 18:44
  • $$2^4×127^2×129^2$$ is also obvious – Barackouda Apr 29 '24 at 20:35

2 Answers2

28

Here is a reason why this problem would probably be very hard to solve.

Suppose $(n^2 + 1, n! + 1) = d$. Then any prime divisor of $d$ must be a prime greater than $n$, so $d$ must be a prime greater than $n$ and equivalent to $1$ modulo $4$. Thus, we are looking for a prime $p \equiv 1 \bmod{4}$ and an $n < p$ such that $p | n^2 + 1$ and $p | n! + 1$.

Look at this from the perspective of a random $p \equiv 1 \bmod{4}$. It is well known that there exactly two choices for $n$, $a_p$ and $b_p = p - a_p$, such that $p | a_p^2 + 1$. Given this, as far as I can tell, there is nothing definite we can say about $a_p!$ and $b_p!$ modulo $p$, other than the fact that they are not divisible by $p$. Thus, we can heuristically assume they are equally likely to be equidistributed in $(\mathbb{Z} / p\mathbb{Z})^*$ modulo $p$. Therefore, there is about $2 / (p - 1)$ chance that $p$ satisfies the desired relation.

Taking union over $p$, I conclude that in an interval $[A,B]$, roughly $$\sum_{p \in[A,B], p \equiv 1 \bmod 4} \frac{2}{p - 1}$$ $p$ would satisfy the desired constraint. We know that $$\sum_{p \in[A,B], p \equiv 1 \bmod 4} \frac{2}{p - 1} \approx (\log\log B - \log\log A).$$ Solving for this greater than $1$(i.e. at least one solution exists), we get $$B \geq A^e.$$ @Peter has kindly verified that no solution less than $2 \times 10^6$ exists. Thus, if I were to gamble, I would bet that a solution will eventually pop up, but it is around $$(2 \times 10^6)^e \approx 10^{17}$$ which is far beyond the computational ability of my computer.

A few more words: the reason I believe we can say nothing about $a_p!$ modulo $p$ is because number theorists have not figured out how to deal with factorials beyond Wilson's theorem. For example, seemingly innocent problems like Brocard's problem remain wide open.

P.S. If you were to search for primes of the form $p = n^2 + 1$ only, I would bet no solution exists. The reason is that we can show $$\sum_{p = n^2 + 1, p> 10^6} \frac{2}{p - 1} < \sum_{n = 10^3}^\infty \frac{2}{n^2} \leq 0.01.$$

abacaba
  • 11,210
  • There is a clear pattern that only the factorials $4!,5!,7!$ are solutions to the Brocard's problem. However these patterns are usually not considered when discussing Brocard's problem. Of course patterns are not a proof but they may lead to a proof. – user25406 Jul 02 '23 at 13:20
  • The values of $a_p!$ and $b_p!$ modulo $p$ are related. Namely, by Wilson's theorem, $$a_p!b_p!(-1)^{b_p}\equiv a_p! (p-b_p)...(p-1)\equiv a_p(p-1)!\equiv -a_p \equiv b_p\pmod p.$$ – Alex Ravsky Nov 02 '23 at 09:02
  • @AlexRavsky Nice observation. But I don't think this breaks the heuristic, as I don't know any reason that make $a_p!$ not behave like random nonzero element modulo $p$. – abacaba Nov 06 '23 at 05:07
  • @abacaba can we show $x<0,n>2$ the zero of the two function $$f(x)=\frac{1}{(x/(n^2+1))!},g(x)=\frac{1}{(x/(n!+1))!}$$ are not the same ? – Barackouda Nov 30 '23 at 09:47
  • Also, if a solution $n$ exists and your heuristics is true, it is at least $\sqrt{p} \approx 3\cdot 10^8$. The denominator in the series will be $(3\cdot 10^8) ! \approx (10^8)^{3 \cdot 10^8} \approx 10^{10^9}$. This means the series deviates from the series around the billion-th digit after the dot... quite hard to detect numerically! – Andrea Marino Jul 31 '24 at 09:30
-3

The easy way :

Lemma 1 :

Let $n>6$ be an integers and $k$ a positive integers such that $(n+1)^2+1$ is not a prime number then we can write: $1+(n(n+1)+1)!=1+k((n(n+1)+1)^2+1)$.

Straight proof of lemma 1 :

To show it use Fibonacci's identity $(n^2+1)((n+1)^2+1)=1+(n(n+1)+1)^2$, and remark the divisors are less than the square roots of $(n(n+1)+1)^2+1$ and use the fact that's not a prime numbers for $(n+1)^2+1$.

Then $$\gcd((n^2+n+1)!+1,(n^2+n+1)^2+1)=1$$ Where $(n+1)^2+1$ is not a prime number

To go further Cauchy's induction ? or from wikipedia source :

Menon

To be continued...

Barackouda
  • 3,879