Giter Club home page Giter Club logo

prime-century's Introduction

Are there 100-number ranges that contain no prime numbers?

TLDR: Yes, lots. But here are some rarer finds: 3,740,047,600 has 16 primes (surprisingly many) following it in the next 100 integers. And 2,704,900 has 17 following.

Details

My original point was to re-create OEIS A038822, "Number of primes between 100n and 100n+99." https://oeis.org/A038822 . Look at the scatterplot graph. Less than 5 primes in a 100 digit range is pretty special. Started out finding those, but then we got faster, so we can find primefree. And even find 15-, 16-, and 17-prime centuries!

For sequence of primes per century:

EXPECTED = np.array([25, 21, 16, 16, 17, 14, 16, 14, 15, 14, 16, 12, 15, 11, 17, 12, 15, 12, 12, 13, 14, 10])

Primefree centuries A181098: 16718, 26378, 31173, 39336, 46406, 46524, 51782, 55187, 58374, 58452, 60129, 60850

Single-prime centuries A186393: 1559, 2683, 4133, 10048, 11400, 12727, 12800, 13572, 14223, 14443, 14514, 14680, 14913, 15536, 15619, 16538, 16557, 17334, 19043, 20452, 20465, 20522, 21162, 21663, 22440, 22832, 23055, 23144, 23214, 23460, 24833, 25139, 25278, 25980, 26207, 26257, 26702, 26747, 27536, 27878, 28448, 28671, 29180, 29873, 30212, 30232

Okay, so 15 and 16 are much rarer than 0! OEIS for 16 (A186408) goes up to century 8995086259, meaning 8.99E11.

10 ** 10 takes 45 sec to find the primes. The biggest 16-prime century my laptop handles okay with tqdm is 37400476, meaning 3.7E9. So I set max to 4E9, which takes about 16 seconds.

prime-century's People

Contributors

zimolzak avatar

Watchers

 avatar  avatar  avatar

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.