# Prime Spirals - Numberphile

Share
Embed
• Published on Jul 9, 2013
• Prime numbers, Ulam Spirals and other cool numbery stuff with Dr James Grime.
More links & stuff in full description below ↓↓↓
James Clewett on spirals at: thexvid.com/video/3K-12i0jclM/video.html
And more to come soon...
* subscribing to numberphile does not really change your physical appearance!
NUMBERPHILE
Website: www.numberphile.com/
Subscribe: bit.ly/Numberphile_Sub
Patreon: www.patreon.com/numberphile
Numberphile T-Shirts: teespring.com/stores/numberphile
Other merchandise: store.dftba.com/collections/numberphile
• Science & Technology

• Smish 0 Day ago

What if we do a Sacks spiral but instead of square numbers we use cubes?

• james caley 5 days ago

So what is the predictive value of this? If a diagonal has a large number of primes is that true if you extend the diagonal? Or does the probability of finding a prime regress to the mean?

I have seen similar patterns like this in data before. When I insisted it is non-random other people think I am just seeing things. Maybe I am just autistic or something...

• Nokia n900 10 days ago

Is it just me, or does this guy's eyes always look like he's on LSD?

• Osanne 16 days ago

I wonder if the patterns are still as obvious if you would exclude even numbers. I mean, of course there's all these diagonals; horizontals and verticals can't form if you always come across even numbers on those lines. except for the 2, primes are never even...

• In the middle of the random patern was a chinese sign 😱😉

• Anthony Williams 17 days ago +1

57 IS a prime number tho 4:49

• Jonty's Corner 20 days ago +1

What if you highlighted numbers which only have a single other factor which is also a prime?

• HippySlayer3.14 26 days ago

This guy looks like a mixture of doctor Watson and bilbo

• David A. Yorkson 26 days ago

Has anyone tried to do a 3D spiral? Or cubic spiral? Perhaps in higher dimentions different patterns can appear...

• Klauz Wayne 27 days ago

When you created the noise chart visible at 3:20 , did you exclude the "even" diagonals from potential noise?
And did you put in the same total amount of points in both pictures?
Also on the primes sheet you see a higher density in the center than on the white noise.

• Santiago Martinez 28 days ago

Spiral from 1 to 12, where 13 takes the place of 1 and continues on to 14 ... and so on and son... and you will see that all primes line up... Nicolas Tesla patent it.

• Cokeman5 29 days ago +1

As far as I can tell, with the equation 4x^2-2x+1, besides the beginning(3,13,31), you will never get 3 primes in a row.

• Kalle K Month ago

Maybe soon we will see the prime of prime spirals on prime time.

What if you go in a Hilbert’s curve?

• Wardhouse Month ago

Best of Hans Zimmer/One Simple Idea.mp3

• james boyd Month ago

How about projecting the numbers from within a sphere?

• what if you use a hexagonal spiral, or not a spiral at all, what if you add in negative numbers?

• Ed Mark Month ago

What if we spiral only with odd numbers?

• Osmund Francis Month ago

7:24 And that big gap is the squares ... and the squares minus one. This is because a square number, minus one, has two factors (x^2 - 1 = (x + 1)(x - 1)).

• Colby Marsh Month ago

Woah on the sax spiral, the primes seem to form a sorta of Cardioid!

• What's on my mind Month ago

If you only circle even numbers you will get diagonal lines as well, also if you do the same thing for odds, you get diagonal lines.

This is not a pattern, sorry to break it to yall.

• theodor dimou Month ago

Another weird thing with primes is the space between. From 0 to 100 you have odd space always a pattern of 1,3,5,7 after 100 you have power of 2 space always. 2,4,6,8,10,12,14...

• John McGuire Month ago

Another way to say PRIME is INDIVISIBLE, and another way to say INDIVISIBLE is FASCIST (dun-dun)!

• roglo Month ago

4x²-2x+1: for x=4, it is 57, Grothendieck's prime number! :-)

• Have you read Douglas Adams books? Try making Ulam spiral starting with 42 (which is "the meaning of life")...

• Seraphim227 Month ago

Ah, the dirty windowpane spiral...

• Kenji Gunawan Month ago

Me be like: OF COURSE THERE ARE STRIPES! EVERY EVEN NUMBER IS NOT PRIME, EVERY MULTIPLE OF 3 IS NOT PRIME, EVERY MULTIPLE OF 5 IS NOT PRIME, ETC. WHICH MAKES IT LOOK STRIPE-Y.
For those of you who thinks I was wrong - the exception for the multiples is the first multiple of 2, 3 or 5.

• David Wilkie 2 months ago

Primes and Cofactors of primes, like the "turtles all the way down" assertion, are and infinite regression arranged fractal-frequency geometry arranged/projected by resonance around the Universal vanishing point, .dt, in probabilities that are naturally occurring conception of e-Pi-i resonance in Time Duration Timing, as potential possibilities derived from the Origin of the Temporal Superposition-point Singularity. We are embedded in the unity of active probability surrounding zero-infinity difference macroscopically and inside the infinite expansion of zero-infinity displacement in eternity, spacing.

So the superimposed vanishing point distributed connection of modulated QM-Time Principle, is a continuously created multi-phase universal timing statement, drawn in eternal co-existence probability positioning, ..of macro-micro +/-projection, Quantum Operator spirals pivoted on the Supuerspin unit quantization Principle In-form-ation of the Phys-Chem vortices-vertices, of Atomic and Astronomically integrated form-ulae.
The "wibbly-wobbly timey-wimey vortex" of reversible perspective could be the basis of an amateur researcher's understanding of WYSIWYG. Because log base e spiral spacing of constant potential positioning occurs naturally coordinated at the interference connection of e-Pi-i resonance imaging of multi-phase superimposed frequency interference..(?).
(Needs some actual Mathematicians to do the work, "numberness" works as the discrete, provable elemental steps of Natural number systems, and in indefinite continuously created connections of modulated Calculus Integration Information fields in QM)
Fun to Imagine.

• Simon Coppack 2 months ago

Vihart!

• Rachel McClain 2 months ago

Do you think the pattern might be clearer if plotted in more dimensions?

• Brendan Franklin 2 months ago

Random with rules.

• Ruffi Fuffler 2 months ago

A demand for exceptions in the rules for ordering symbols, implies that base arithmetic defines the need for the next prime without contradiction to prior order, so writing the transcendental general rule will soon become arbitrarily complex without a co-hog relationship to the physical, so says Hairy Wau?

• stupid_sleazoid 2 2 months ago

Well I definitely see patterns in white noise picture he showed

• Hi ! I have recently found a way to represent any prime using powers of the golden ratio. Would that be important ? I have all the calculations (algebra) ready! I also wrote programs to further test the results. I still have to write the paper. But to wich journal ? Wich one would be appropriate ? I am a trained astrophysicist and amateur mathematician. Please help !

• saultube44 2 months ago

Prime Numbers Equations by James Grim please, make it happen, 8.75 years later watching this but I'm interested in Him doing the video, and yes I'm subscribed

• MrAffeman 2 months ago

Primes reveal themselves "somewhat" on a 2D plane, what if you made a 3 dimensional cube, could it be more obvious where the primes are? What if you take it one step further to a hypercube, what will that show?

• Well, i think it's intuitive that they're appearing on diagonals since the spiral you made has all the odd numbers on the corners of each square as the squares spiral larger.

• Christopher Kingsland 3 months ago

I was struck by the idea when seeing this prime spiral mapping - Is it possible that the distribution of planetary systems across a galaxy (i.e.ours, since we can now gather stats given the number of discoveries so far), and even more interestingly - super earths - is somehow related to prime distribution? After all, like pi, e, and i that seem to come up everywhere, why not primes? Is there some kind of geometrical relationship between prime (integers), the big two irrationals (pi and e), the golden ratio, and i (perpendicular to our 3D reality)?

• Joseph Asghar 3 months ago

Dizzying and beautiful

• Truce 3 months ago +1

Primes are always odd so if you took random odd numbers wouldn't it create diagonals as well

• aud_io 3 months ago +6

I discovered something very interesting about primes. It seems that all of the prime numbers greater than 3 are either one more or one less than a multiple of 6. I did some googling and apparently this is a known thing, and there's even a way to prove it.
Any number can be described by one of these 6 categories:
(1) A multiple of 6
(2) A multiple of 6 plus 1
(3) A multiple of 6 plus 2
(4) A multiple of 6 plus 3
(5) A multiple of 6 plus 4
(6) A multiple of 6 plus 5
For categories (1), (3), and (5), you would always end up with an even number, so none of those numbers can be prime. For category (4), you would always end up with a number divisible by 3, so none of those numbers could be prime either, so all prime numbers must fall within category 2 or 5, which would mean any prime greater than 3 could be represented with 6n+1 or 6n-1. 6n+5 and 6n-5 would also work too.

• Steve T. 3 months ago +3

Writing a number line in a hexagonal style produces some pretty interesting spirals as well. All primes fall on one of two axes, either the 1st, or 5th axis, and you can see where the multiples of inner numbers will "block" because of the patterns of every multiple of every number crossing on to either axis. -Where any multiple of any number crosses the 1st or 5 axis, there will be no prime. Also it's pretty to stare at lol. ((1-6 for the first ring, then 7-12 for the 2nd ring 13-18 for the 3rd ring. -with 7 above 1, 8 above the 2nd side, 9 above the 3rd, 10 above the 4rth side, 11 above 5, 12 over 6, 13 above 7 in the 1st column, 14 above 8 in the 2nd column .... ect.....)) You can see clearly where n mod 6 = 1, and also when n mod 6 = 5. :)

• aud_io 3 months ago +2

I discovered something similar by drawing a graph of fractions with the x-axis as the denominator and the y-axis as the numerator (I only did it for fractions less than 1 to make it less tedious). I put dots on the fractions that are in simplest terms and a small circle on all repeated ones, and then I drew lines to connect adjacent and diagonal dots, and afterward I colored in all of the repeating shapes. The denominators that were multiples of 6 had a really amazing looking pattern to them. I kinda want to buy some huge graph paper to make a bigger version (I only had room to go up to 20/20). Definitely gonna try that hexagon thing too!

• TheDerpy Kitty 3 months ago +1

Steve T. Now I have to try this

• Luca Crisi 3 months ago

Why isn't 1 considered PRIME?!

• TeeTerTime 4 months ago +1

G2 wins the invitational and Pengu is over here talking about numbers!

• mamaboo cee 4 months ago

I love primes...

• Mehico2fel 4 months ago

Are those random numbers was odds?

• medexamtoolsdotcom 4 months ago

I don't see why it would be a surprise that there would be certain lines that are heavier or lighter than others. For instance mark off the lines where the multiples of 3 are, and there will of course be NO primes on those lines. Same with 5's. So rather than being uniform, there will be those lines where there is nothing at all. Well, you superimpose a bunch of things like that together, with things being fainter in some lines and darker in others, and I would expect to get something just like this.

• Ken Taylor 4 months ago

I did this with a fibonacci snowflower spiral. There are some spirals here of odd numbers without primes present.

• Ken Taylor 4 months ago

I think these are the product of two odd numbers.

• Daniel A Millar 4 months ago

Did the random one exclude evens? I’m not doubting that prime numbers aren’t totally random, but I do wonder if that visual example is disingenuous.

• Faic Legion 4 months ago

Oh I remember doing this

• Brian Tepper 4 months ago +1

Curious if there are any other types of spirals that show other interesting patterns when filled in with primes

• Wagner Lip 4 months ago

Trying to make a visual image that justify more patterns for primes, but we don't know primes. In real, we do know what is NOT primes, so we could make a pattern for those, and perhaps, primes start to appear easier. Also, spirals induce to a sequence of logic quantification, primes do not follow that pattern, we already know that, so why follow that path?

• Neko Master 4 months ago

why not fractal

• Yiyi Wu 4 months ago +1

It is obvious why the “stripes” pattern exists. It’s because in this layout odd vs even numbers form sort of a chessboard. Besides 2 every prime is odd. Even though not every odd is prime our brains will notice the pattern created by only numbers of one “color” on the chessboard being illuminated

• Yiyi Wu 4 months ago +1

In other words the only way he has refined the search for primes is to not include even numbers! Also seems silly to compare to randomness

• Cracked Emerald 4 months ago

I think that we need to discover another type of number to fully understand primes

Probably if someone would use a 3, 4 or 7-dimensional base the pattern would be just a straight line, the line of truth connecting past with the future, a thread of the unknown realm. Maybe AI automatic algorithms will solve this.

• Joe Harris 5 months ago

"And ye shall know them by their stripes."

• Emilio Arroyo Mohamed 5 months ago

Try again the spiral without even numbers and see if there are still stripes

• Omegacat13 5 months ago

Hello from the future! You might want to sit down, I have a lot of things to warn you about. Like a lot, a lot.

• OceanSky Web Design 5 months ago

You would really love this book. I did. Peter Plichta illustrates how the prime numbers are ordered on concentric circles numbered 1 to 24 and then 25 to 48 and so on; expanding outward like cross shaped rays of sunlight radiating outward. The guy was a genius!

• Fracmik 5 months ago

Maybe plugging primes into the equation is the way to obtain more? Just a random idea from a not-advanced-educated viewer

• Little Cripple 5 months ago

My favourite pattern is whenever you put all the primes in a spiral, and whenever you highlight all primes, you get a completed spiral. Pretty cool huh

• Prabhat Soni 6 months ago

Great visuals!

• Kim Welch 6 months ago

So, you're doing a bunch of 2-dimensional spirals. Have you looked at 3-dimensional or 4-dimensional spirals. Yes, it's really hard to do on paper, but some of the 2d stuff you're showing look like projections from a larger dimensional shape.

• Casey 6 months ago

Has anyone searched for the opposite of the golden diagonals, with the lowest density of primes?

• Angela Garet 6 months ago

Primes frequency is moving away from perfect squares, cubes, etc.

• It also appears that, within the grid of this square spiral, there is a preponderance of contrasting horizontal and vertical lines whereupon non-primes lie.

• 3:20
if you skuint at it you can see stripes in the random patern
but they aren't as vibrant, dense and long as in ulam's spiral

• Engineer Asik 6 months ago

any sequence having general term tn=an²+bn+c where a,b,c are constants is called quadratic sequence

• Engineer Asik 6 months ago

• huckbeduck 6 months ago

I found an equation to find the next number, going diagonally or horizontally or vertically. (This is for all the numbers to create an ulam spiral without writing every digit). Just add 8 to the difference between two of the previous consectutive numbers of the direction you want to go. 2,10,26,50 is a diagonal for example; (50-26=24, 24+8=32, 32+50=82. "82" is the next number in the sequence.

• Soreofhing 6 months ago

1:16 "He was sat...". "He was seated...". There. Fixed it for you.

• kirigata 6 months ago

I wonder what those lines would look like if plotted in 3d. instead of using a square for the spiral, try a cube?

• Simon Shugar 6 months ago

3:10 Wouldn't it be better to compare the prime spiral to random ODD numbers chosen instead of ALL numbers? Odds are all diagonal from each other in this spiral so it may just be that that we're seeing.

• Max Musterman 6 months ago

Need help. Is there a way to get the (x,y) position of any number? 1 has (0,0).

• Supernova 7 months ago

That's amazing! I love this!

• Shivam Mishra 7 months ago

The line equation is a parabolic eqn , which in the second diagram seems to be a spiral

• Kids 4Life 7 months ago

I was doing some math and found that (2n)+(n^2)-1 created primes very well if n is even. Example: (2 x 99922222222220)+(99922222222220^2)-1 is prime. I also saw that up to 200 being n (leaving out odd numbers) it spit out a prime 42% of the time.

• ryavix 7 months ago

Now if only we could get these over educated folks to STOP thinking 2 dimensionally.

• Mondo LeStraka 7 months ago

Love this!!

• Andriy Makukha 7 months ago

Ulam comes from Lviv, one of the most beautiful cities in Ukraine. There are places that he used to visit with his math buddies.

• Krishaang Kohli 8 months ago +5

James showing his true 'attraction' for primes
"Look at these curves."

• BigMan Ollie 8 months ago

what would happen if you were to do this with other tessellating shapes? i.e. filling in a spiral on a map of hexagons etc..?

• saqqaq _ 8 months ago

James Grime? MORE LIKE JAMES PRIME

• Svsnmurty Gattimi 8 months ago

I am working on Composite Numbers factors based on normal Algebra and Geometry( not divide 1,2,3,..). I need One composite number with unknown factors to find factors based on my work. please help anyone.

• Caden Bintliff 8 months ago

i eat children

• Velma Velvet 8 months ago

The round one reminds me of the Earth's magnetic field.

• Toph Morris 8 months ago

4:49. So, when x=4, the result isn't prime? That somehow seems logical to the degree of being obvious, but I suppose it isn't since there's a +1 in the formula itself. I want to experiment with this now and see the values of x that give you prime numbers and those that don't, and compare/contrast. I can't imagine this already hasn't been done, though. Moments like this, I hate being a math pleb.

• Robert Morgan 8 months ago

What if you only circle the mersenne primes?

• Brandon Gammon 8 months ago

What would a square spiral of just prime numbers look like???

• jat green 9 months ago

ok, i'm writing a computer program to go in spirals checking for diagonal lines and predicting primes and checking if they are. i really want to see how many primes it comes up with and how fast it is compared to a simple primes checker that checks every number

• Steven Wenker 9 months ago

Please zoom out a little bit

• Brandon Hamer 9 months ago

I wonder what it would look like if you did ulams spiral but coloured numbers according to how many prime factors each number has. All primes would be one colour, then numbers like 6, 10, 14 and 15 another colour and 8, 12, 18 and 20 another and so on. I tried looking to see if someone had done this but couldn't find anything.

• The Walnut Destroyer 9 months ago

Great

• Robi_CK 10 months ago +14

0:58 - Kudos for pronouncing Stanisław right, with "ł" not "l".

• Timothy Hinkle 10 months ago

if you repeated this same experiment in more than 2 dimensions what are the results? 2,3,4...26

• Jake Mooshian 10 months ago

I would like to see Ulam's spiral using only odd numbers.

• Nikhil Nirmal 10 months ago

Must watch Channel Nikhil Nirmal
Prime numbers identification easily .

• Corpus Crewman 10 months ago

I love how the primes graphed along the Archaemedian spiral result in figures that resemble logarithmic graph functions.

• Luis Padua 10 months ago

I'd like to see a video on the standard model lagrangian density formula.