Pull back the curtain on

exploring the undesigned
intelligence of the numberverse

lists/generators: Perfect Squares, Composites, Primes


"...out all day long.
All day long,
it goes on and on"

The First 1,000,000...

Lists of Perfect Squares

Lists of Composites

Lists of Primes

Generate Your Own Up to 1027...

Perfect Square Generator

Prime Factors Generator

Prime Generator

Experimental Calculators

ZetaTest: Infinite series

MinusSquare: Factoring

FermaticTest: Probable prime

QTest: Quadratic Series

RadiusTest: Spiral lines and curves

PrimeTest: Analysis

Miller-Rabin: Demonstration

Secrets of the Spiral

Explore the Sacks Number Spiral


Proximate-Prime Polynomials

A proximate-prime polynomial is simply a quadratic equation - a finite polynomial of the second degree - that is derived from four successive (proximate, or neighboring) primes. Proximate-prime polynomials are interesting because they exhibit much greater prime densities than other polynomials.

The high primality of prime-derived quadratic sequences

What is a "perfect prime polynomial"?

What is polynomial pronic alignment?

Use an Excel spreadsheet to explore polynomial primes!


Catch the Wave...

The Wave

When you graph primes against an X-axis that treats the expanding interval between successive perfect squares as a constant unit subdivided into equal parts, you produce a distinctive wave form for primes and prime factors.

Try out an ingenious Excel worksheet to see the wave!

Counting primes by quadratic interval


Fixing Fermat’s Factorization Method

How do you make Fermat's method of factorization faster than trial division...?


The Magic Square of Subtraction...

For every composite number that is not itself a perfect square there exists a pair of nonconsecutive perfect squares whose difference is equal to the composite. Even before we get to the subject of factorization, the consequences of this observation are fascinating and far-reaching.

Part 1 - A 'Classic Discovery' 
Part 2 - A Deterministic Test


Q-Paired Primes...

It began with an exploration of biquadratic paired primes: 2 primes separated by the equivalent of exactly 2 quadratic intervals.... Then the investigation took the logical next level by asking the question: Are there prime pairs that are separated by other, greater multiples of the quadratic interval? And if there are, what are the frequency characteristics by interval size and perfect square offset? The results are in, with charts, an Excel visualization, and masses of half-digested data...!

Read about the latest findings

What are Biquadratic Paired Primes?

Two "new" rules of perfect squares


How I learned not to be afraid of big numbers

It's a question of magnitude...


Using Excel as a tool for number theory

Find examples throughout this site that demonstrate using VBA code with worksheets and graphing - including generating primes, perfect squares, and composites, doing modular arithmetic, calculating GCDs, and more....

First published June 26, 2014 with major revisions through July 20th.
Special thanks to Shafiq U. Ahmed for his encouragement and advice.
See below for my newly formulated proof of Statement 2

A logical proof of the Twin-Prime Conjecture

"There are infinitely many primes p such that p + 2 is also prime"

You don't need a team of mathematicians to prove the twin-prime conjecture.

Here is a logical proof in two sentences:

Statement 1
A natural number N of form X^2-1 where X>3 can be expressed as the product of two factors: X-1 and X+1.

Statement 2
Of the infinite set of Ns of a form X^2-1, there is an infinite subset for which X-1 and X+1 are prime factors.

The first argument is an arithmetic property that does not require elaboration. It states that there is an infinite set of square numbers minus one that are the product of two factors, composite or prime.

The second argument states that there is an infinite subset of square numbers minus one that are the product of two prime factors (semiprime).
The second argument is correct using the following logic: Of the set of X^2-1 there is a subset for which both factors are prime. (To be clear, X-1 and X+1 can also be composite - one or the other or both. Although a deterministic proof of Statement 2 cannot be provided yet, it is proved by the Infinitude of Primes and the Fundamental Theorem of Arithmetic. Using axiomatic set theory, both the set and the subset must be infinite.

However, real mathematicians need more proof than commonsense logic can provide. The following is a proof of Statement 2.

First published July 19, 2014 with subsequent revisions

To prove Statement 2, begin with the following elaboration of Statement 1:

If a natural number of the form X^2-1 is greater than (X-1)^2 / 2 by a prime and less than (X+1)^2 / 2 by a prime then X-1 and X+1 are twin primes.

What does this really mean?

I will now provide a proof by induction that of the infinite set of natural numbers X-1 and X+1 (which can be composite-composite, composite-prime, prime-composite, or prime-prime) there is an infinite subset of X-1 and X+1 that are prime-prime:

If a natural number N of the form X^2-1 is an odd number, there exists an even-number difference with the previous square number ("perfect square").

There is an infinitude of such Ns.

All prime numbers can be expressed as half an even number.

All prime numbers can be expressed as half the difference between an odd N of the form X^2-1 and the previous perfect square.

There are an infinitude of primes such that P = X^2 +Y^2 (Fermat's theorem on the sums of two squares), and there is an infinitude of primes such that P = X^2 +Y^2 (Pythagorean primes) where X = Y-1.

The Ns of Step IV are of the same form as the subset of the Pythagorean primes where X=Y-1.

It follows that there are an infinitude of primes of which Step IV and Step V are true.

Thus, there must be an infinitude of  Ns of the form X^2-1 for which the factors X-1 and X+1 are both prime.

Therefore, "There are infinitely many primes p such that p + 2 is also prime".

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 

The base case of the proof - the elaborated Statement 1 - says that the X-1 and X+1 factors can be one of the following pairs (and in no particular order):

X-1 is composite, X+1 is prime
X-1 is prime, X+1 is prime
X-1 is prime, X+1 is composite
X-1 is composite, X+1 is composite

The following four successive values of X^2-1 illustrate the four possible combinations of composite and prime, with red being prime numbers:




- (X-1)^2

- (X^2)-1































.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 

To step back, correctly understood, Statement 1 is saying by implication that the twin-prime conjecture is a verisimilitude of the Infinitude of Primes and the Fundamental Theorem of Arithmetic.

That the twin-prime observation ever acquired the sobriquet conjecture is, actually, something of a mystery unto itself. Why it became established as "one of the great open questions in number theory" most likely lies in its very late "discovery", in the mid-19th century. One can imagine that Euclid - if he was the first person to realize the Infinitude of Primes - as a geometer saw that twin primes are an artifact of square numbers and would not have thought it an observation worth making. If he had made the observation then, it would not have been the "mountain out of a molehill" that modern mathematicians have made of it.

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 

Now what I've told you does not seem to be all that earth-shattering, does it?

However, it turns out that this is the whole story as to where you'll find twin primes. The frequency is subject to the rapid expansion of square numbers and the gradual thinning of the prime numbers. The distribution is subject to the coincident points where the X-1 and X+1 factors are also prime numbers.

- We know that the perfect squares are growing exponentially.
- We know that the frequency of the primes is diminishing asymptotically.

We infer that these two artifacts of the number line can cause the appearance of an apparently chaotic coincidence of the prime factors for square numbers minus 1.

This distribution suggests to those who assume complexity without testing their premises that proving the twin-prime conjecture is difficult - when it is, essentially, self-evident.

I suggest that solving the Rubik's cube is a much harder proposition than this problem could be in a multitude of arithmetic universes. Simple things can appear complicated, and complicated things can appear simple. This is most certainly in the former category.

Your comments, suggestions, objections, and counterarguments are most welcome on Quora.

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . 

There is one very nice practical result of this proof that is self-evidently correct and that also empirically proves it. This is simply that you can infinitely traverse the number line in subpolynomial time to find an infinite number of twinned primes. (When I have time, I will share a super-simple Excel VBA macro to demonstrate this!)

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

There is a ton of empirical evidence on this site, since 2007, that illustrates the general distribution of twin primes - and twinned primes - is predicated on and predicted by the geometric expansion of perfect squares: the "quadratic interval".

In truth, the number line is neither a line nor is it straight. Twin-prime and twinned-prime distribution is unbounded. The architecture of numbers does not enter a parallel universe, understood only by the self-selected few, when they reach a certain outlandish magnitude. We do not require our mathematicians to count "how many angels can dance on the point of a needle".

Let's begin with a thought experiment... “Go forth and multiply”.

-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -

Monty Hall Problem for Dummies

No other mathematical puzzle has produced more heated arguments and more misunderstanding than the Monty Hall Problem. It's tempting to call it deceptively simple, but the truth is it's deceptively complex. In fact, I can simplify its essence to one question: If you were handed two decks of cards, one with 2/3 aces and the other with 2/3 jokers, and were asked to pick an ace, from which pack would you draw the card? If that is not a sufficient clue, you need to read this.

Factor Families

A factor family is a set of composites that share common factors. The family begins with a semiprime, and all members of the set share the two prime factors of the semiprime. The family can be extended indefinitely. For example, for the first 100,000 odd composites the factor family of 4619 (149*31) looks like this:

There are a few things to note about this representation: The prime factors (in red) are distinct, so, for example, 3 can be 3*3 or 3*3*3, and so on. The complete factors (nonprime and prime in blue) of each composite all have three common factors: the semiprime and its prime factors. By definition, a semiprime cannot have nonprime factors.

Download Excel worksheet: Factor Families (1.5 MB)

Modal Distribution of Distinct Prime Factors:
It’s Not Necessarily What You Might Think

Yes, you can find the answers to life's most persistent questions here! What is the cumulative distribution of distinct prime factors? The answer is both what you were expecting and more than you were expecting. As expected, the cumulative frequency of unique prime factors diminishes with size, so that 2 is the most frequent factor, 3 is the second-most frequent factor, 5 the third, and so on for all prime factors. However, it turns out that the cumulative frequency of the largest prime factors - the biggest factor of each composite - has a modal distribution that is increasing at a slow rate approximating the cube root of N. Up to 10,000, this mode is 19. Up to 1,000,000, this mode is 73. It's fairly safe to assume that if we graph any given set of numbers, there will be a distinctive peak near P^3 = N.

Distribution of the largest prime factor for each composite less than 10,000. (The difference
between the even and odd curves is accounted for entirely by the exclusion of prime numbers.)

Download Excel worksheet: Distinct Factor Analysis (macro-enabled) (30KB)

Paired, Squared, Cubed, and Primed...?

If we pick a square or a cube and count up to the nearest prime number, what are the odds that a prime number will also exist if we count up by the same amount from its root? The answer, it turns out, is surprisingly high - and even higher for cubes than for squares. If the question sounds confusing, it's easy to illustrate:

Squared example:

Square Prime Offset Root Prime Offset
3025 3037 +12 55 67 +12

Cubed example:

Cube Prime Offset Root Prime Offset
79507 79531 +24 43 67 +24

The results are:

  • For squared numbers up to 1 million, this relationship holds true 41.0% of the time (410 out of 1,000).
  • For cubed numbers up to 1 billion, this relationship holds true 59.8% of the time (598 out of 1,000).

Download CSV files: Squared-1000 (30KB) and Cubed-1000 (35KB)

  • For squared numbers up to 100 million, this relationship holds true 31.4% of the time (3,143 out of 10,000).
  • For cubed numbers up to 1 trillion, this relationship holds true 44.7% of the time (4,472 out of 10,000).

Download CSV files: Squared-10000 (351KB) and Cubed-10000 (425KB)

What has 6 got to do with it?

Here is a little observation: The difference between the first and fourth prime number of a proximate-prime polynomial is ALWAYS A MULTIPLE OF 6.

For example:

Prox. Prime Poly.
1st Term
4th Term
7th Term
10th Term
13th Term
 n^2 + n + 10157 
 n^2 - n + 10331 
 2n^2 - 2n + 10627 
 n^2 - n + 11777 
 n^2 - n + 12107 
 2n^2 - 2n + 12277 
 2n^2 - 2n + 12409 
 3n^2 - 3n + 12653 
 n^2 + 5n + 12785 
 n^2 + n + 12887 

Surprisingly, this divisibility by 6 does not stop with the fourth term. It recurs with the polynomial's 7th term, 10th term, 13th term, and so on ad infinitum.

Lots more data available: PPPs < 50000, t1 - t15 ("T" denotes each t value divisible by 6)  Download (115KB)

Do you know why?

Factoring in Polynomial Time: A Pronic Solution...

Sometimes the best things in life are free - well, almost free... and very simple... and blindingly obvious. A single GCD calculation using the closest pronic number to N will produce a factor for one-third of composites not divisible by 2 or 5 up to any size. For example, the nearest pronic to 898097881 is 898110992, and these numbers share a GCD of 1873 - a prime factor of both numbers.

An analysis of N < 10,000,000 shows that 35.8% of the nonobvious composites are factorable with a single GCD calculation. What is the common characteristic of this huge class of numbers? They appear to conform to rational angles in the Sacks number spiral. Such numbers can be generated with RadiusTest using the Lines option and produce polynomials with a third coefficient of 0.

Expanding the GCD calculation to pronic numbers within 6 quadratic intervals of N provides a nearly instantaneous factorization test for more than two-thirds of composites ending in 1, 3, 7, or 9 regardless of magnitude. Here is an analysis of composites less than 107 with GCDs calculated for pronics from 6 quadratic intervals less than N through 6 quadratic intervals greater than N. It shows a 74.4% success rate.

Analysis for N<107 Download (11MB)

Previous Articles
Instantly factor a semiprime!
Reveal the DNA of semiprimes
The Q square of factoring


Tools for Testing Natural Numbers

MinusSquare: Alternative Factoring Algorithm (beta)

The magic square of subtraction has given birth to a baby factoring algorithm.

Download Program (25KB)

Miller-Rabin Primality Test: Demo with source code (beta)

Desktop program and complete project source code for implementing the gold standard in primality testing. A fast and reliable test for numbers up to 1027-1 (that's 1 with 26 9s - a prime number...!).
(The project illustrates how to use a legacy language, VB6, not designed for big integers. It includes modular exponentiation code by DI Management Cryptography Software.)

Miller-Rabin Primality Test

Download Project (10KB) Download Program (17KB)

FermaticTest: Prime and Pseudoprime Calculator

"Fermatic" is a made-up word: Fermat + Automatic. This tool takes Fermat's great theorem to the limit, with some experiments to weed out pesky pseudoprimes. Rapidly generate prime, pseudoprime, and composite data.


Download (34KB)

QTest: Quadratic Sequence Calculator

Enter 3 or 4 numbers in a sequence and find out what the next 10, next 1,000, or next 10,000 values are. QTest lets you derive a quadratic equation from the values you input (and solve the equation's roots). Then you can use this polynomial to generate and analyze long number sequences for primality. (See Robert Sacks' method for quadratic derivation, used in Vortex.)


Download (35KB) How to Use QTest

RadiusTest: Polynomial Line and Curve Calculator

Calculate prime and composite distribution in the Sacks Number Spiral by offset (curved series) and angle (straight series).


Download (22KB)

ZetaTest: Infinite Series Calculator

Calculate the products of infinite series using almost any inputs you can think of. Generates real number zeta series, demonstrating the calculation of many important constants - including e, pi, and phi, the Basel equality and Apéry's constant.

To calculate pi, use the screenshot settings

Download (23KB)

PrimeTest: Prime and Composite Analyzer

Prime and composite number calculator (with prime and nonprime factor analyzer and prime number generator).


Download (31KB)

Tools that are digitally signed are published by: Wordwise Solutions

This site is dedicated to exploring
undesigned intelligence
of the numberverse

Undesigned intelligence proposes that the universe is the way it is neither by accident nor by design. The axioms of mathematics, the laws of physics are what they are innately and without reference to percepted existent reality. The intelligence inheres in and is nonreferentially existent without regard to the observer. Undesigned intelligence is uncreated.





Recommended sites:

Number Spiral

Number Spirals

Divisor Plot

Interesting Graphing Applets

© 2007-2014 Michael M. Ross