What is the Mystery of Prime Numbers Anyway?

YouPhysics
5 min readJan 7, 2023

The primes serie is ilimited, but we only know if certain number is prime if we verify it through its factoring.

However, we can create a prime number A resulting of the sum of 1 with the result of multiplication of all primes until certain prime P. For example:

In this way, supose the infinite serie of primes, that is, P tending ∞, so A tending ∞+1, that is ∞. So, ∞ would appear as a prime number.

Now, let’s supose the serie of natural numbers. And let’s take its factorial multiplication F(n):

In the same form, if we make n tend to infinity, obviusly that F tend to ∞. In this case, ∞ would appear as a no prime number.

Thus, a contradiction is reached. However, there is nothing wrong, because according to the theory of limits, such situations are considered as indeterminacy. This is the case, for example, of the trigonometric function sin(x) when x tends to ∞.

Although we arrive at such indetermination, we can create a statistic, given the randomness of prime numbers and thus visualize what information it would be possible to extract from it. Let’s follow the following strategy:

  1. Set a number N non-zero positive integer, and;
  2. For each number n in the series from 2 to N:
  3. Let’s go to determine how much primes are in interval 1 to n, lets call this quantity by P_counter;
  4. A statistical factor, f, will be calculated as a result of dividing P_counter by n.

This can be done manually, but for large values ​​of N it is more productive to use computational resources. We developed a script to run on the Matlab® platform, which is listed below, but it can be used in any computer language with the necessary tweaks.

% |PRIME NUMBER ANALISYS|
% For run in Matlab platform.

% Memory allocation for matrix:
Number = zeros(100000, 5); Number(1,1)=1;
%{
Column 1 natural numbers set of 1 until N ;
column 2: counter numbers of divisors for each in column 1;
column 3: store TRUE or FALSE, if prime ou not prime respectively;
column 4: store absolute frequence of primes in subset of each number
in column 1;
column 5: store relative frequence of primes in subset of each
number in column 1.
%}
disp('Starting...'); % only a information.

% User input:
prompt = {'Enter a natural number for analisys:'};
dlg_title = 'User Input';
num_lines = 1;
defaultans = {'1000'};
N = str2double(inputdlg(prompt,dlg_title,num_lines,defaultans));

P_counter = 0; % counter inicialization for statistic.

% Searching for primes.
for i = 2:N
Number(i,1)= Number(i-1,1)+1; % Sequence 1 to N.
for j=1:i % sub sequence for search.
Test = mod(Number(i,1),Number(j,1));
if Test == 0 % found divisor.
Number(i,2)= Number(i,2) +1;
end
if Number(i,2)>2 % when rule of primes will violated.
Number(i,3) = false;
else
Number(i,3) = true;
end
if Number(j,3) == true
P_counter = P_counter +1; % counter update for statistic.
end
end
if Number(i,2)==2
Number(i,4) = true; % prime atribute.
else
end
Number(i,4)= P_counter ; % How much are primes in subset.
Number(i,5)= Number(i,4)/Number(i,1); % create statistic.
P_counter=0;
end % End of work for N natural numbers

% Ploting
disp('Go ploting...')
for i=1:N
plot(Number(i,1),Number(i,5),'Marker','.','Color','blue')
grid 'on'; hold on; xlim([0 N])
end

disp('End of task.') % End of program.

The results in the form of a n×f plot are presented below.

  • Result for N=1000:
  • Result for N=5000:
  • Result for N=10000:
  • Result for N=20000:
  • Result for N=50000:
  • Result for N=60000:
  • Result for N=100000:

Apparently there is a tendency for the value of f to approach zero, which can be seen initially by calculating an angular coefficient m, for example in the interval in n equal to 997 and 988

and

repeating this for other differentiated values ​​we have successively:

The absolute values ​​of m appear decreasingly as n grows. This probably happens due to the fact that as one walks in the series of natural numbers, the prime numbers are incorporated as submultiples composing non-prime numbers in an “accelerated” way, mitigating their population, but not canceling it.

Thus, as n grows the “frequency distribution”, f, also takes on an aspect of “intrinsic” regularity, decreasing in value very slowly, coming to imagine that the x-axis would be an asymptote of f. But the default is always to have m different from zero, because f will never be, in a deterministic way, equal to a constant value, precisely because the series of prime numbers is unlimited and appears to have a hyperbolic behavior.

That is, prime numbers are necessary but not sufficient to define ∞ as a prime.

--

--

YouPhysics
YouPhysics

Written by YouPhysics

We are very interested in being well informed about the scientific and technological environment.

No responses yet