# Prime Spirals - Numberphile

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!

And "golden line" in this context was made up by Brady!

NUMBERPHILE

Website: www.numberphile.com/

Numberphile on Facebook: facebook.com/numberphile

Numberphile tweets: twitter.com/numberphile

Subscribe: bit.ly/Numberphile_Sub

Videos by Brady Haran

Patreon: www.patreon.com/numberphile

Brady's videos subreddit: www.reddit.com/r/BradyHaran/

Brady's latest videos across all channels: www.bradyharanblog.com/

Sign up for (occasional) emails: eepurl.com/YdjL9

Numberphile T-Shirts: teespring.com/stores/numberphile

Other merchandise: store.dftba.com/collections/numberphile - Science & Technology

BigMan Ollie3 days agowhat 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 _4 days agoJames Grime? MORE LIKE JAMES PRIME

K K4 days agoGreat video! Thanks.

Svsnmurty Gattimi10 days agoI 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 Bintliff12 days agoi eat children

Velma Velvet15 days agoThe round one reminds me of the Earth's magnetic field.

Toph Morris20 days ago4: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 Morgan20 days agoWhat if you only circle the mersenne primes?

Brandon Gammon21 day agoWhat would a square spiral of just prime numbers look like???

jat greenMonth agook, 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 WenkerMonth agoPlease zoom out a little bit

David SmithMonth agothats no spiral

Brandon HamerMonth agoI 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.

Nin compoopMonth agoGreat

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

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

Jake Mooshian2 months agoI would like to see Ulam's spiral using only odd numbers.

Nikhil Nirmal2 months agoMust watch Channel Nikhil Nirmal

Prime numbers identification easily .

Corpus Crewman2 months agoI love how the primes graphed along the Archaemedian spiral result in figures that resemble logarithmic graph functions.

Luis Padua2 months agoI'd like to see a video on the standard model lagrangian density formula.

Jack Kidd2 months agowhat if you write the numbers in triangles, or pentagons, or hexagons....instead of a square

Hamza1473 months agoAmazing ! You remind me some of my discussions about prime numbers with a dear friend of mine when we were at high-school.

Axe3 months agoLong ago, I've found two interesting formule for primes: sqrt(120n+1) and sqrt(120n+49).

For quite a lot of values of n, whenever the formula's output was an integer, it was prime. What's more, the first formula returned primes ending in 1 and 9, and the second - in 3 and 7. I haven't calculated the breakdown point (value of n where the formula returns a non-prime integer) due to lack of experience in number theory, but it seems to be quite high. Could you please look at that? Maybe not in a video, but is there any research done on this already?

Kai Na3 months agoWell primes are odd, so it appears normal to see stripes if you arrange numbers in a spiral, since odd and even numbers are intertwined

Venkatesh babu3 months ago1=√1=√1/1=√1/√1=1/√1=√1×√1=- i^2 = ... , So Fibonacci series is powers of i.

David Tribble4 months agoWhat's so special about the primes?

I've wondered for many years now if primes can be considered just a special case of the set of naturals having 2 divisors, Sd(2) = {2, 3, 5, 7, 11, ...}, where the next set is the naturals having 3 divisors Sd(3) = {4, 6, 9, 10, 14, 15, ...}, and so on for Sd(4), Sd(5), etc. Sd(1) is just {1}, of course. The trick, then, is to find numeric relationships between Sd(i) and Sd(j), and then generalize these to all Sd(n, for all n in N).

S. Smith4 months agoA similar concept I came up with while doodling in school too...

Get grid paper, and do rows, draw lines through primes; they line up at various different angles

He Fr5 months ago"look at those curves" -James Grime

Algorithm5 months agoI used this exact concept in 5th grade when I was just playing around with primes and trying to figure out a pattern. It's interesting to see that there is actually a pattern as I didn't notice anything when I did it. I only went up to 100 though.

AlekVen's stupidface5 months agoYou know that if you write down numbers like that, every diagonal will either contain strictly odd numbers, or even numbers, and they'll follow each other?

Of course you'll see the pattern of primes considering that, excluding 2, every single one of those is odd, thus only lie on certain diagonals.

Nathan 11325 months agoninja

Nathan 11325 months agoil é ou gotaga ?

Nathan 11325 months agogo 1vs1 fortnite

Nathan 11325 months agoez

Frank Harr5 months agoYou know, the primes may or may not have a patter, but the non-prime DEFFINATELY have a pattern.

A. Joe6 months agoThe primes in the Archimedian spiral look very much like parabolic functions rotated 90 degrees to the left. Has anyone investigated whether there may be a complex rotation of a second order polynomial involved in creating this pattern?

Дмитрий Кузнецов6 months agoI wonder if anyone tries to do real math in some other system of calculation different from decimal. may be those patterns could be seen even easier.

Aaron Rotenberg6 months agoWhat do you mean 57 isn't prime? Everyone knows it's the Grothendieck prime!

Denis SEO6 months agoSo on some visual representation you can get a straight line of primes going into infinity?

z6 months agojames prime

thebudkellyfiles6 months agoThank you for so many great and interesting videos.

paperEATER1016 months agoI see Elvis in the "random" picture

Sodium Hypochlorite7 months agoIt kinda looks like a swastika. I wonder if math is trying to tell us something.

nightmisterio7 months agoDo prime visualization in base 12

Ted Rowell7 months agoCan someone make one of those squares where all the even numbers are in the correct location, and all the odd ones random? I wonder what that would look like.

Leo Yohansen7 months agoCompare it with the graph for 6x + or - 1.

Xa7 months agoIt seems to me that the reason the prime numbers form diagonal lines is just because they're odd. After all, if you circle all the odd numbers instead of the prime numbers, you'll get a checkerboard-like grid. Naturally, since prime numbers, besides 2, are odd, they will tend to form random diagonal lines.

DJ Q7 months agox^2 + x + [button smash your calculator here]

RBWN7 months agoa

Osanne7 months agoCould the pattern of diagonals (partially) be caused by the fact that prime numbers except two are always odd numbers?

In such a spiral notation the odd and even numbers immediatly form a grid of odd and even number lines, and prime numbers can already only exist on half of those.

So the difference from a completely random pattern is already visible the moment you say "the random numbers cannot be even". I doubt there would be a clear difference between odd random numbers and prime number patterns.

MisterNewOutlook7 months agoHave these spirals been tried on a sphere or within a sphere?

Chris Larson8 months agoThe cause for the diagonals appearing in the prime spiral as opposed to the chaos in the randomly generated picture is because the prime spiral creates a checkerboard between evens and odds. Essentially, if you took the random pictures and then removed all of the even, my hypothesis is that it would look similar to the prime spiral with respect to the prevalence of diagonals

Gunihelm Schaf8 months agoI found a equation who gives u every prime number

Patryk Wieczorek8 months agoMaths is beautiful!

ScarletFox8 months agoWhat if we're thinking of this wrong.

Every pattern like this creates a line in which no primes are possible.

Maybe the primes are the gaps where every one of these lines from every possible pattern doesn't cover.

Paul White8 months agoWanna see how to find primes ?...map them onto a set of concentric circles of 24 sections each . Each section represents one sequential natural number and keep going for each larger circle. You will find them only on 8 " rays " from the centre. All very geometric .See prof. Dr. Peter Plichta's book ...god's secret formula. I believe the formula 6n + 1 or - 1 ,might be worth looking into. Cheers all

Sander8 months ago@3:18

I'd like to see that picture of random numbers, but with the added rule that all even numbers other than 2 are excluded. This because the picture is now also filled with horizontal and vertical stripes while in the Ulam's spiral it is by definition only possible to form stripes that are diagonal.

CornerTalker9 months agoTry putting the digits of pi in an Ulam's spiral and then marking the primes.

magnusee9 months agoDont do it in a grid. Try a honeycomb pattern

magnusee9 months agoHexagonales

John Perkins9 months agoI would like to see the spiral with the obvious diagonals removed, then see if other diagonals become apparent.

ROVAKAN9 months agowhere can i get those pictures of spirals please ?

Ismir Eghal9 months ago0:23 rap career secure if maths should one day not

work for him anymore

Computerman 219 months ago^{+1}7:08 is a fingerprint

Anonyme Anonymes9 months agoExcellent video

Marcelo Fernandes10 months ago@Numberphile The patterns at @7:13 are very similar to potential flow lines around a horizontal flat plate!

VITA kyo10 months agoTry an hexagonal pattern instead of squares

Jesse Leonard10 months agoThis guy and a dirty chalkboard goes hand in hand. Ugh I love numberphiles

Jesse Leonard10 months agoIf I found them in college I wouldn't have failed any math classes

AraChan10 months agoPucci aproves

Oqsy10 months agoIf you keep going with the second arrangement you realize that the “basketball” is just the beginning of a pattern that looks like:

(_)_)::::::::::::::::D~~~

A ROCKETSHIP FIRING LAZERS!

Banjon Pro10 months agoDo all mathematicians truly believe that we are in a simulation, or is it just me? It's hard to find arguments against it.

Khalid Salah10 months agowho's here for advent of code'17 day 3?

Erika Vega10 months agoLove this guy!

My Life In A Nutshell10 months agoThe story of the Ulams spiral is written in my book of maths of high school, so I get interested,

I knew I would find a video of Numberphile, and you guys told exactly the same story, but even better ! props for that my dudes

Gershom Maes10 months agoAt times it almost feels like the *definition* of primes would be "the sequence of numbers which partially appears most frequently throughout the set of all integer functions, without ever precisely matching the results of any function".

RobatRobot10 months agoWhat happens if you start drawing the square at 0? I note from other comments that since the pattern is formed in part due to the relationship between primes and odd numbers, I just wondered if it made any difference whether or not you start with an odd or even number. It would change the numerical-position of each corner, and hence the 45° nature of the existing pattern. What happens if you start at -1?

Kevin Morais11 months agoFactor all numbers and spot primes in between here thexvid.com/video/K9gKZNAWZ9M/video.html

Jakob Jones11 months agoWhats more is that those stripes intersect in a regular array. They are equally spaced apart. You can notice the squares and they are all about the same size. I wonder if one can look at this in higher dimensions and find a pattern?

TheMattyBoy0011 months ago^{+1}After seeing this I was curious about other spirally shapes, so I wrote a quick java program to generate a 1001x1001 grid of a rhombus shape like this:

7

... 6 2 8

13 5 1 3 9

12 4 10

11

...and the result is rather astounding! You can see clear horizontal lines of prime numbers (but not many vertical), some of which seem to carry on for very long without much interference. Link to picture in first reply (I think some people block comments with links in them so it's best to have it separate)

explosu11 months agoI also notice some that are very sparse. If there's anything in between, it makes me wonder if there are some lines with finite primes, or completely solid

BeN Dr0wNeD11 months agoI wonder... If someone were to take all thos dots and indent them onto paper as braille what words could a blind person make from it??

anoderone11 months agoSo... lines with only odd numbers have more primes than lines with only even numbers: well done Sherlock!

I tried doing the same but with only odd numbers and using a hexagonal spiral instead of square. I also get an interesting line. In the first (6n²+8n+3) there are 5 primes in the first 6 elements (3, 17, 43, 81, 131, 193), but then only 3 primes in the following 9 elements. So... meh. I think the conclusion from such a spiral done further would just be that lines with no multiples of 3 (such as 6n²+18n+13) have more primes than lines made of multipes of 3...

Parthian Capitalist11 months agoSo if I don't listen to lectures and just doodle, I'll become famous,

bruno alves11 months agoI always thought that random is an absolute thing, something either is random or it is not. Apparently prime numbers are not random, but they dont seem to form any concrete patterns either, so how can they be random and at the same time not?

I believe that there is a formula somewhere or a way that we have not even considered or thought about to find all prime numbers.

I just don't think that they are random if they form some kind of patterns, and as numberphile showed there are a lot of patterns. If they were random they would look like that image that he showed.

So, if they are not random, they can be predicted, that's my belief.

Martin Popplewell11 months agothexvid.com/video/LrvDT-4vTZM/video.html

Ostrum11 months agoat 7:04 anyone else recognise this looking a bit like part of the Mandelbrot set?

YipHyGaming - Truncation [150 coming]11 months agoDied at the sack one tho

GordieGii11 months agoPart of it is because half of the diagonals are even.

Federico11 months agoit really looks like FF. and in fact other ppl already did it :D

verioffkin11 months agoWe can do the same with letters or even words.

Sudden Cucumber11 months agoSacks spiral looks like a fingerprint

Libor Supcik11 months ago2 What ifs...a] what if you use 3D spiral in some regular way which may be a way wool threads are made; b] what if you print it out binarily adding the 0s and 1s into a 2D or 3D spiral smudging [bold font] out the ones that belong to primes 1 to 15 = [1101110010111011110001001101010111100110111101111]

OriginalLictre11 months agoConsidering that regular hexagons tesselate just as well as squares, I wonder what the prime distribution would look like in a hexagonally arrayed Ulam spiral.

Pola Huchwajda11 months ago^{+1}Isnt 1 prime?

nerdzilla13511 months agowow Vi got a mention

Jay Steg11 months agoYou need to move 2 around to each 8 places around one and generate all of those images. Then place the 2 in each point in 3 dimensions around 1 and generate those spirals. Then you may have more basis for a pattern. A useful one. You could also consider starting with zero. It's just dang interesting need more variants.

Hans Lee11 months ago^{+1}The thumbnail looks like James is tripping on acid

Weldy Wiel11 months agoAsk him.. whats the forecasting formula for a lottery winning number..

Meena Patil11 months agoHe used squares to make a spiral lines..can we use higher powers..? Does it make a pattern..? Like cubes and 4th powers

Neeme VainoYear ago5:10 The proof is available. Where to open it?

percy de vriesYear agomy theory about the diagonals showing is that because of even numbers never being able to become prime (2 excluded) there can never be prime next to eachother on a horizontal line or a verticl line for that matter which is why we seem to see diagonal lines its because its the only lines that can have primes "touching" eachother thus lines form