Answer the question
In order to leave comments, you need to log in
How to find all possible variants of summation and subtraction of natural numbers with minimal storage of initial ones?
Any two natural numbers can be added or subtracted. The only thing cannot be summed up and subtracted from itself.
We will consider them initial.
For example. Two numbers
2 and 3 , from this pair the numbers
2+3 = 5
3-2 = 1 will be known
. Negative numbers are not taken into account.
Suppose we add another initial 8, then we get such additional options.
8+2 = 10
8+3 = 11
8-2 = 6
8-3 = 5
That is, at the moment we know such a sequence.
1, 2, 3, 5, 6, 8, 10, 11
Where are the initial 2, 3, 8
At the same time 4, 7, 9 are unknown
So the task is to fill in a completely series of prime numbers, with the storage of the smallest number of initial ones. And what would be the least number of intersections.
Intersection means this.
Adding the seed 12 to find 4, we get these options
12+2 = 14
12+3 = 15
12+8 = 20
12-2= 10 (intersection)
12-3= 9
12-8= 4
4, 9 we found , but 10 is already obtained by the intersection of two possible combinations.
Of course, you can do all this by enumeration, with the storage of the matrix, and I implemented this to a certain size. But padding is needed for large numbers from 100 bits onwards. No memory is enough to hold such a matrix, even if the found beginning is truncated.
Maybe there is some logarithm or algorithm for finding such numbers?
I've tried prime number series of different algorithms, nothing works.
I've been struggling with this issue for a long time now.
Answer the question
In order to leave comments, you need to log in
In essence, the task is as follows.
Develop a non-positional number system to represent any prime number with the smallest number of symbols in the system.
A non-positional example is Roman. I/II/III symbols. Or fibonacci system 1,1,2,3,5,8. In your case, the symbol also includes a plus or minus sign.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question