Git Product home page Git Product logo

Comments (6)

billwang2010 avatar billwang2010 commented on August 11, 2024

977=210x4+137
983=210x4+143
991=210x4+151

from buildingprimenumbers.

zhaohonggang avatar zhaohonggang commented on August 11, 2024

based on below description on https://github.com/zhaohonggang/BuildingPrimeNumbers/blob/master/building%20prime%20number.txt#L68

m is Prefect Composite Number. m=1 x.....x p
n is the next Prefect Composite Number after m. n=m x q = 1 x...x p x q
[q..m] is the set of all primes and products of primes between q and m. The members of [q..m] is unlimited. If a, b, c are in this set, a x a x a..., bxb...., axaxb, axbxcxc…will also in this set

theorem 1: This theorem describes all prime numbers between m and n can be built using this approach
If b is prime, m < b < n, b can be describe as b = k * m + a
1 <=k < q, a < m, a is 1 or belong to [q..m]

as the case of 983,

m is 210 = 2 x 3 x 5 x 7
so p is 7
n is 2310 = 2 x 3 x 5 x 7 x 11
so q is 11

so if b is 983 = 210x4+143 then a is 143 < m

a belong to [q..m] which is not necessary to be a prime, but is the set of all primes and products of primes between q and m.

143 = 11 * 13, it is the product of prime numbers between [11, 210]

So your examples are not breaking my logic...

from buildingprimenumbers.

zhaohonggang avatar zhaohonggang commented on August 11, 2024

In another word, the logic can be used for generating prime numbers from small to big, but cannot be used to determine a smaller prime number from a larger prime number.

from buildingprimenumbers.

billwang2010 avatar billwang2010 commented on August 11, 2024

既然合数可以被加入来算素数,那么,为何你的公式
31=30+1
37=30+7
41=30+11
43=30+13
...
53=30+23
59=30+29
这些全部都是尾部加上素数呢(1,7,11,13,23,29)?能不能统一一下算法,把为何去掉合数的判断加上呢?这样别人才不会被前面的算法误导,楼主你说是吧?

from buildingprimenumbers.

zhaohonggang avatar zhaohonggang commented on August 11, 2024

For above examples, only the left side should be prime, cannot guarantee for the right side.

It is saying every prime numbers can be represent by using an adding expression, but not saying the numbers in the expression will be prime.

The direction is using add but not subtraction, like 30+11 -> 41, 210x4+11 * 13 -> 983,

Cannot go like 983 - 210x4 = 143, using this way cannot guarantee to get prime, the larger the number to be, the more not prime examples will happen.

It is the math law which is talked about here, not determined by me.

from buildingprimenumbers.

zhaohonggang avatar zhaohonggang commented on August 11, 2024

Your suggestion of lacking examples in document were reasonable.

Added more examples, including below,

https://github.com/zhaohonggang/BuildingPrimeNumbers/blob/master/building%20prime%20number.txt#L65

353=210+11x13 (this is an example of using products of primes in [11,30) instead of a single prime for construction, this kind of examples will grow when number getting larger)

from buildingprimenumbers.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.