- Community Home
- :
- Code and Documents
- :
- More Documents
- :
- Community Documents
- :
- An new combination number decomposition method

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Document History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report to a Moderator

An new combination number decomposition method

Labels:

Hi

I am a Personal researcher who likes to use modern tools for research. Fast retrieval, computer means and computing tools, the NI LabVIEW application in this process and the transfer of complete thinking have improved the efficiency. This has helped people achieve pragmatic and efficient goals. So I chose this source document to share in the NI Forum.

NI LabVIEW program provides me with intuitive and convenient construction for completing this program construction, and can start testing immediately when the idea appears. and continuously adjusts to a self-consistent state. Avoid excessive time expenditure and get work results more effectively.I will be happy to present these findings here.

This method gives the simplest inverse calculation method available. so as to give the way of checking prime numbers in computer machine calculus.

Generally, for decomposition, only odd numbers within** sqrt ( M )** need to be determined, so the computational complexity can also be greatly reduced.

Obviously, you also have better ways to improve the details.

We have a large number B and need to decompose its prime factor

1, First, it is determined whether the large number can be squared.

If you can't square into the [for loop], the loop of times is the size of a large number B.

2, Set a counter p ( for P = 1,B, P + + )

3, Let [ B ]and[ p ] each time to get the number N = B /P, and judge whether the [N] is an integer or float.

4, If B can be divided exactly, set a counter J to clear and then J to add 1

5, If J is 1

Then use the division result [N] of division the above large number to check the end and deterNine if N is odd, if odd,J + 1

6, Judge whether the end of **P+ N** is even, if even, J + 1

7, If j = 3 and I > 1, then stop loop, output .

8, Count Arrived, Stop Cycle

We can find the [P] and [N] varian is prime number.

(B/P)mod 2=((N+P)mod 2 )+1

You can also find the formula in the doc file.