Treceți la conținutul principal

Postări

Se afișează postări din august, 2017

NUMERE PRIME ALGORITM C++

//NUMERE PRIME ALGORITM C++

BPN = 2 POW 74207281 -1

odd impar
even par

!!! any even number is a sum of two even numbers or two odd numbers or two prime numbers
!!! any odd number is a sum of a odd number and a even numbers
!!!  prime numbers can not be a sum of two prime numbers but will be a sum of a prime number and an even number 
!!! any prime numbers will be odd too but not all odd number are primes


0, 1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 
37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 
79, 83, 89, 97

1 = 1 + 0+ 0              0
2 = 1 + 1+ 0              1
3 = 2 + 1+ 0              1

small numbers 

5 = 3 + 2+ 0              2
7 = 5 + 2 + 0              2
11 = 7 + 3 + 1            4
13 = 11+2 + 0            2
17 = 13 + 3 + 1 4
19 = 17 + 2+ 0 2
23 = 19 + 3 + 1 4
29 = 23 + 5 + 1 6
31 = 29 + 2 + 0 2
37 = 31 + 5 + 1 6
41 = 37 + 3 + 1 4
43 = 41 + 2+ 0 2
47 = 43 + 3 + 1 4
53 = 47 + 5 + 1 6
59 = 53 + 5 + 1 6
61 = 59 + 2+ 0 2
67 = 61 + 5 + 1 6
71 = 67 + 3 + 1 4
73 = 71 + 2+ 0 2
79 = 73 + 5 + 1 6
83 = 79 + 3 + 1 4
89 = 83 + 5…