# 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

bnkjkdsbklafj hjbvjhbfdasjka16 hours ago3: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 Asik4 days agoany sequence having general term tn=an²+bn+c where a,b,c are constants is called quadratic sequence

Engineer Asik4 days agothat quadratic polynomial is the general term for the quadratic sequence

huckbeduck7 days agoI 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.

Soreofhing10 days ago1:16 "He was sat...". "He was seated...". There. Fixed it for you.

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

Simon Shugar16 days ago3: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 Musterman23 days agoNeed help. Is there a way to get the (x,y) position of any number? 1 has (0,0).

Supernova25 days agoThat's amazing! I love this!

Shivam Mishra25 days agoThe line equation is a parabolic eqn , which in the second diagram seems to be a spiral

Kids4 LifeMonth agoI 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.

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

Mondo LeStrakaMonth agoLove this!!

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

Krishaang KohliMonth agoJames showing his true 'attraction' for primes

"Look at these curves."

BigMan Ollie2 months 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 _2 months agoJames Grime? MORE LIKE JAMES PRIME

K K2 months agoGreat video! Thanks.

Svsnmurty Gattimi2 months 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 Bintliff2 months agoi eat children

Velma Velvet2 months agoThe round one reminds me of the Earth's magnetic field.

Toph Morris2 months 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 Morgan2 months agoWhat if you only circle the mersenne primes?

Brandon Gammon2 months agoWhat would a square spiral of just prime numbers look like???

jat green3 months 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 Wenker3 months agoPlease zoom out a little bit

Brandon Hamer3 months 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 compoop3 months agoGreat

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

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

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

Nikhil Nirmal4 months agoMust watch Channel Nikhil Nirmal

Prime numbers identification easily .

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

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

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

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

Axe5 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 Na5 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 babu6 months ago1=√1=√1/1=√1/√1=1/√1=√1×√1=- i^2 = ... , So Fibonacci series is powers of i.

David Tribble6 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. Smith6 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 Fr7 months ago"look at those curves" -James Grime

Algorithm7 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 stupidface7 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 11327 months agoninja

Nathan 11327 months agoil é ou gotaga ?

Nathan 11327 months agogo 1vs1 fortnite

Nathan 11327 months agoez

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

A. Joe8 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?

Дмитрий Кузнецов8 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 Rotenberg8 months agoWhat do you mean 57 isn't prime? Everyone knows it's the Grothendieck prime!

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

z8 months agojames prime

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

paperEATER1018 months agoI see Elvis in the "random" picture

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

nightmisterio9 months agoDo prime visualization in base 12

Ted Rowell9 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 Yohansen9 months agoCompare it with the graph for 6x + or - 1.

Xa9 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 Q9 months agox^2 + x + [button smash your calculator here]

RBWN9 months agoa

Osanne9 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.

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

Chris Larson10 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 Schaf10 months agoI found a equation who gives u every prime number

Patryk Wieczorek10 months agoMaths is beautiful!

ScarletFox10 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 White10 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

Sander10 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.

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

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

magnusee11 months agoHexagonales

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

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

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

work for him anymore

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

Anonyme Anonymes11 months agoExcellent video

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

VITA kyoYear agoTry an hexagonal pattern instead of squares

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

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

AraChanYear agoPucci aproves

OqsyYear 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 ProYear agoDo all mathematicians truly believe that we are in a simulation, or is it just me? It's hard to find arguments against it.

Sebastian StarkDay agoIt's also hard finding arguments for it.

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

Erika VegaYear agoLove this guy!

My Life In A NutshellYear 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 MaesYear 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".

RobatRobotYear 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 MoraisYear agoFactor all numbers and spot primes in between here thexvid.com/video/K9gKZNAWZ9M/video.html

Jakob JonesYear 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?

TheMattyBoy00Year 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)

explosuYear 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

GalaxbeeYear 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??

anoderoneYear 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 CapitalistYear agoSo if I don't listen to lectures and just doodle, I'll become famous,

bruno alvesYear 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 PopplewellYear agothexvid.com/video/LrvDT-4vTZM/video.html

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

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