• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Whenever you search in PBworks or on the Web, Dokkio Sidebar (from the makers of PBworks) will run the same search in your Drive, Dropbox, OneDrive, Gmail, Slack, and browsed web pages. Now you can find what you're looking for wherever it lives. Try Dokkio Sidebar for free.


Primality, GIMPS, and other prime stuff

This version was saved 9 years, 3 months ago View current version     Page history
Saved by Bill McEachen
on February 12, 2014 at 10:56:53 pm
Gadgets powered by Google

(caveat: please credit the author for anything used from this page (Bill R McEachen))


2/2014  primorial approximation: ln(Y)= x^2/102+4.35x  -30.4   for x>19,  thru x~81  (within 1.6% accuracy)

       or   ln(Y)~  x^2/(23Q) + Qx -7*Q

    ex. actual ln(66#)=300, approx. 299.43  ie so ln(Y)proportional to x^2/102, 4.4x

as more points are fit,  C2 decreases, C1 increases, C0 decreases


A235399 pari code


(8)need look:  A38569, ,A57000,A145605,A130046,A64520,A62329,A46675,A5590


Jan 24 2014 charts:  A228446, A230546, A233654, A6577, A135141, A234520, 

Noe:  A38569, ,A57000,A68396,A138472, A145605,A130046, A64520, A2260, A62329, A46675, A132213, A5590, A125688,

other (look):  A64413, A2618, A18900, A5245, A6666, A5132, A6577, A141095, A80738, A76217, A99302, A48601, 


mine:  A226095

Nov 8  I may submit a seq relating to A135076


Nov 3 2013  submitted seq 231115 relating to A083849

A   83844  3.0+ ?? only 25 terms;  sumdigits(987)=24  PARI


Oct 26 2013 my newest OEIS sequence A228446 stemming from a conjecture of ZW Sun (odd #=prime + x(x+1) )...Cf A046927.  Its log plot is very appealing, and I subsequently found Sun's A230546 sequence plot similarly interesting ...I also just learned of Ming-Zhi Zhang's conjecture (OEIS A036468) that any odd number greater than one can be written as x + y (x, y > 0) with (x^2 + y^2) prime. Eg 2^2+5^2=29, and 7=2+5.  


Sep 11 2013 I came across this via OEIS A000040 (the prime numbers)

     I conjecture that Sum(1/(p(i)*log(p(i))))=Pi/2=1.570796327... Sum_{i=1..100000}(1/(p(i)*log(p(i))))=1.565585514... It converges very slowly. - Miklos Kristof, Feb 12 2007


May 28 2013  I submitted OEIS A226095, primes formed from specific concatenation of integers>2.  Good volatility and multiplicative effect.  For hit rate, let n=5000000, and Primepi~ 331281.  The alg script IDs 559290 primes in 5000000 integer evals (ie primality tests), for 559290/5000000=11.2%.  This count is above 331281, a good number of them are >5000000, so it is superior when one can accept non-sequential primes and wants them bigger than smaller.  The maximum gap between primes thru n=5000000 follows:  gap=9.882*ln(x) -38.8.  Very unlikely for sequence to be finite.


Feb 8 2013 rumor is a new Mersenne Prime is found (exp=57885161  which is 17,425,170 digits long).  I will update my next prediction when time permits (my last one was 43581437 < XX < 121000000).  See wikipedia for more info.  Using the last 15 pts, the next MP exponent is forecast in range 59E6 and 64.3E6, though it could be much higher.  Digits stem from exp/2.3026, so this corresponds to a range to 19.4 million digits.


Nov 4 I just came across A134204 and its beautiful plot supplied by TD Noe at 



Oct 27 2012 I submitted draft OEIS sequence 218391 relating to a property distinguishing composites and primes (the orig observation is someone else's)


Jul 2011 I did a bit of scrutiny and added comment for OEIS A084639.  Here is more detail:  OEIS A084639


Feb 16 2011 I submitted a sequence related to Mersenne numbers today to OEIS.  It relates to factors having the form k*n+1  where MN=2^n-1  (A186283).  I can provide Pari script.  Thru the first 200 MN, the composites yield  ~90% for the form shown.  This merely says you are well served to try that specific divisor form before further brute force.  I also submitted the dual form  (A185343).  This topic relates to factoring work I am doing (in my limited spare time).  


Feb 13 2011 I note the Lagarias seq is A057641, which is a favorite of Peter Luschny, whose website includes among other things info on computation of factorials.

I sent errata list on David Wells book to Wiley


Feb 2011 I note the earlier link given for George Spencer-Brown is dead, the only stub is

http://laws-of-form.net/lof/  which has a phone contact.  I retain his method and Primepi estimates in a Google spreadsheet.  I revisit this because of reading David Wells' Prime Numbers.  I always learn something, and learned about Chris Nash's proof concerning the algebraic sum of primes below any number N>17.


Dec 2010 been making a few observations and fixes relating to primes at OEIS,Wikipedia, etc


June 9 2009 likely new Mersenne Prime found (exp. 42643801).  After refitting, the next "predicted" exponent ~ 43581437 (the 48th Mersenne Prime, presuming no gaps).  The last 5 or 6 are closely bunched (?) [or if we bring all back in line from the bunching, the next exp could be as large as 121000000 ! ]


Feb 13 2009 I submitted a sequence to OEIS today, here is the data file associated.  typical loglog curve newseq.gnumeric

It is formed by treating the nonzero digits from ratio of adjacent integers >0 ignoring repeating decimals.  So we use 1/2, 3/4, 4/5, to yield scaled as digits 5,75,8, etc.  It is a nice infinite, diverging sequence that is pretty volatile term-by-term. 

All but the 3rd entry contains a 5 or 9 digit.  The log fit (to the log data) is shown on the chart. Here is the plot of the first 160 terms:



Feb 11 2009 I had the comment from someone that my last sequence seemed a bit contrived due to the nature of where the Bernoulli Numbers are found/defined.  I must offer that there would be MANY sequences that could fall into a contrived category before mine, which I would argue is no contrivance.  It merely lays out the Twin Primes which are encountered (we know they will be) but the manner and final plot of that encounter is certainly not known apriori.


Feb 6 2009  add latest sequence A156053.  I have added the image to WikiCommons upload.wikimedia.org/wikipedia/commons/e/eb/OEIS_A156053.svg


Nov 19 2008 list my main OEIS sequences:  A117825,A129912,A077287,A102648,A128910,A147517,A113972,A156053  see http://www.research.att.com/~njas/sequences/


A129912 relates to my main PPP conjecture (primes as f{primorials,primorial products}

A147517 relates to the symmetrical primes as a f{A002110, primorials}

A147853 is a spinoff of A147517 and relates to Goldbach partitions of 2*primorials (A002110), providing very spread Goldbach pairs

A117825 relates to distance from HCN and nearest prime (relates to GC, my HCN conjecture, Fortune's conjecture) this has an interesting pinplot

A077287 concerns a mechanism that generates a lot of prime numbers with very volatile numeric spread (see OEIS scatterplot)

A102648 is just a nice function to generate an interesting spread of values (it is a simple mechanism to quickly generate prime numbers from a fixed range of small integer seeds in a fairly arbitrary way...(see OEIS pinplot))

this version generates values <=20  but this range is dependent on the gain (100) used

A128910 is a tweaked form of the Prime Counting Function (better at range of N many users work with)

A113972  a form I derived that yields an interesting sequence of primes, with many hi/lo transitions

A156053 shows the Twin Primes (lower of pair) encountered by the Bernoulli Number denominators.  Excl duplicates, thru first 15000 BN

A172069 relates the adjacency of primes to entries of A129912


Sep 16 2008 see http://www.mersenne.org/m45and46.htm for info on the 2 new Mersenne Primes

the exponents are 37,156,667 and 43,112,609, for the 45th and 46th Mersenne Primes. These surpass the 10 million digit threshold. After refitting, the next "predicted" exponent ~ 49,318,327 (the 47th Mersenne Prime).

Aug 24 2008 speak more to C Rivera's Conjecture#47

Aug 1st 2008 add Google translate widget

Riemann's Hypothesis

after reading __Music of the Primes__,

re: Lagarias equivalent to Riemann's Hypothesis (An Elementary Problem Equivalent to the Riemann Hypothesis, Jeffrey Lagarias 2002)

I believe an equivalent is

exp(AQ)< exp(H)ln(H) for ln(sigma)~ A*Q +B

where B<=ln(2), A<=1 required (strictly)

H=harmonic# N and Q=harmonic # (N/2)

for N>=7207200, the (0 intercept) slopes ln(sigma)/Q seem to be <1 ie

due to B>0, lower N can accomodate

observation shows that ln(sigma)/Q can increase or decrease with increasing N

- - - -

Inefficient Primality methods

the Pari code for an optimized Wilson Theorem primeness function soon -limited time, so put near-optimized here:$

Harrell's original code is in UBASIC, and had limit of N=6053 in that application, I do not confirm his modification is useful

here is the Pari code for implementing Willans formula for assessing primeness: willans.gp

I am working on Pari implementation of Harrell's ubasic code for Prime Producing Equation, will post when done$$PEND

= = = =

Arbitrary Large primes (200 digit+)

I am working a bit on producing an arbitrary large prime of desired size within Pari. My method appears to work well compared to the "quadratic residue" method I've seen (P^2-2 where P=user-selected odd prime)

I will post more here quad3.gp besides the script, requires the script to generate A2110: a(n)=prod(j=1,n,prime(j)) , expanding primelimit and allocating enough memory


    • an interesting site re: prime producing polynomials much beyond the classic n^2-n+41 types:

http://www.prime-equations.com/index.html by a Mr Hank Harrell

= = = =

Mersenne Primes

using a simple fit from the 1st 44 Mersenne Prime exponents, the 45th comes in circa 8.6E7. We'll see ...the fit is log(MPE)=A*(MP posn)^B R^2=0.99+,(A,B)=(0.1712,0.2310)

= = =

Prime Counting Function (Jun 2 2008 see Spencer-Brown note farther down)

a quick&dirty approx (3 signif digits only) is as follows:

nval=K*N/lnN where K~1.022

ex. n=1E15 returns # primes ~29.6E12

these estimates will be within 1% of actual. Of course, Riemann's pcf is more accurate with a bit more work. the above eq'n is OEIS seq A128910

= = = =

Open Problems

Here are a few links to Open Problems in Math (also see Wikipedia)

see also http://garden.irmacs.sfu.ca/?q=category/number_theory_0

http://maven.smith.edu/~orourke/TOPP/ Open Problems Project


= = = =

May 28 2008 much along lines of Harrell's work, came across a different site which to me is very interesting, akin to Ulam's spiral but more involved it would seem ...I provide the link here (Mr Robert Sacks) http://www.numberspiral.com/index.html

= = = =

I came across George Spencer-Brown's Prime Limit Theorem web discourse and it works xtremely well. It is a much better approx than Li(x)

the link is http://laws-of-form.net/lof/pdf/PrimeLimitTheorem.pdf

I can offer a short spreadsheet in Google docs as requested ...

I realize my nice plot of PCF on Wikipedia was deleted, so here it is back (I will add in GSB data shortly):


This contrasts Riemann,Li(x) etc

= = = =

I came across this basic conjecture: http://www.primepuzzles.net/conjectures/conj_047.htm

essentially it says P=3P1+2P2 where P are all prime numbers

Now, this is of interest, as it allows one to produce a larger prime from 2 smaller ones, in a seemingly very predictable way.

Here is the Pari script to run solutions out: conj47.gp

I MUST give credit to Charles Greathouse for assisting me in finding script bugs

As of today 8/22, it reported first "failure" at 33112, NOT of the conjecture but of my twist on it, that wondered whether the alg solns are "closed" in that every new prime result depends ONLY on the orig seeds {3,5,7,11,13,17} and previous primes produced (working thru the conjecture in ascending order of (P1+P2) sums, which are just Goldbach partitions. HOWEVER, I believe the script is reporting a false Failure, as there are many GP solns using primes in the set. $$PEND to resolve, it may be a sizing issue, as that output is 1007598 lines long ...


links to my other math pages:

main   Twin Primes and Goldbach's Conjecture  Highly Composite Numbers (conjecture)

Comments (0)

You don't have permission to comment on this page.