Is this problem solvable ?

Just starting out? Need help? Post your questions and find answers here.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Is this problem solvable ?

Post by Olli »

Hello !

Here is a strange problem, I submit to you, not without a wicked laugh (!) :

Let's imagine this algo

Code: Select all

2 *2 = 4 ; 2 is prime so multiply
4 *3 = 12 ; 3 is prime so multiply
12 -4 = 8 ; 4 is composite so substract
8 *5 = 40 ; 5 is prime so multiply
40 -6 = 34 ; 6 is composite so substract
etc...
Could we know the first negative value ?
If we could not know it, then could we know its size ? (number of digits)
If again unable, is there a source code which could prove it ?

:mrgreen:
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Is this problem solvable ?

Post by STARGÅTE »

To my first impression I would guess, that the number is always positive, because the number growths faster (due to multiplication of primes) than it reduces due to the subtraction of non-prime numbers.
The number can only decrease if the inverse of the prime density (so the numbers until the next prime where no multiplication happens) becomes larger than the current number divided by the current prime (roughly the count of substraction of the numbers after the current prime).
Any comment on that?
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Is this problem solvable ?

Post by Olli »

Any comment of that, from me anyway, is it is right.

A gap is required. A gap is a succession of composite numbers, and this gap must be as great as necessary to cancel the previous products. It seems that is unabled, due to the "geography" of such a gap.

A difficulty consists in measuring the importance of the products : is this between 10^(10^10) and 10^(10^11) ? I imagine a string that a PB recursive procedure would use any strings to compare.

But the second difficulty is that the substractions are "ridiculous", compared to such a power measuring tool.

It stays the math rule which says that, more a prime number is great, more there is any great gaps around it, this depending of x/ln(x). But x is so great that all the technologies of the world could not predict accurately if there is a great gap which is "near 0 anymore" to cancel the products, by substracting.
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Re: Is this problem solvable ?

Post by drgolf »

no negative number it seems.

Sorry in french :
Intuitivement :
La suite tend vers l'infini et la différence entre les opérateurs s'accroit inexorablement.
Soustraction avec nombre petit. Multiplication avec un nombre très grand.
Mais ce n'est pas une démonstration...

Le code :

Code: Select all

Procedure IsPrime(number.i)

  If number = 2
    ProcedureReturn 1
  ElseIf number % 2 = 0
    ProcedureReturn 0
  Else
    x = Sqr(number)
    For t = 3 To x Step 2
      If number % t = 0
        ProcedureReturn 0
      EndIf
    Next t
  EndIf

  ProcedureReturn 1

EndProcedure

Define.i i,j


j=2
For i=2 To 520  
  If isprime(i)
    If j*i<0
      Debug Str(i) + " : NAN"
      Break
      EndIf
    j=j*i
  Else
    j=j-i
  EndIf
  Debug Str(i) +" : "+Str(j)
  
Next



Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Is this problem solvable ?

Post by Olli »

drgolf wrote:Intuitively: The rest tends to infinity and the difference between the operators increases inexorably. Subtraction with small number. Multiplication with a very large number. But this is not a demonstration ...
Hello, thank you for the test.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Is this problem solvable ?

Post by Olli »

Let's have V, the number of decimal digits of a number x, which is the threshold we reached, testing all the numbers between 2 and x, while we have been executed the operations, depending of the status (prime or composite) of each of these numbers, we get the following function :

Code: Select all

For I = 1 To 6
Debug V * (V + 1) / (2 * Log(Pow(10, V) ) ) - ((1 - (1 / Log(Pow(10, V) ) ) ) * (2 / (V + 1) ) )
Next
... function which describes the quantity of digits of the accumulating value.

If this function can go down under 1.0, we can maybe consider that a negative number is possible.

And it seems that "no". So, maybe (I am not sure of this demonstration), there is lots of chance this problem is not solvable, imagining a negative value is non-reachable.

I apologize...
Post Reply