If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Doodling in math: Sick number games

I don't even know if this makes sense. Boo cold. http://en.wikipedia.org/wiki/Ulam_spiral Doodling in Math Class videos: http://vihart.com/doodling. Created by Vi Hart.

Want to join the conversation?

  • winston default style avatar for user thomasinthailand
    I think that if you highlighted the prime numbers on pascal's triangle you would only get primes on the sides, just to the right (or the left if you're on the other side) of the 1's. Am I right?
    (106 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Daryl
      You are right actually. I'm not sure of an obvious way to prove it, but it's not too hard to prove if you know a little combinatorics (Sorry if you don't, maybe someone else will find it interesting?):

      Basically, for the nth row of the triangle (Where the first row has n = 0, so each row has n as its second number), and the kth element in that row (Where the first element of each row, the 1, has k = 0), that number in the triangle will be "n choose k", which is equal to n! / (k! * (n-k)!). For k = 1, this is just equal to n, which can of course be prime. The same goes for k = n-1, then it's also just n, and these are the numbers you mentioned. But for any other k, we're going to have this number being some product of numbers since the factorials won't completely cancel. And so they're composite.

      Sal's mentioned elsewhere that he plans to eventually add a Combinatorics playlist - Maybe he'll mention the connection between Pascal's Triangle and "n choose k" (Which is the number of distinct ways to choose k elements from a set with n elements) in them. The reason that this connection exists is because, if (n k) = "n choose k", then the following is true: (n k) + (n k+1) = (n+1 k+1). If you're looking at Pascal's triangle and find (n k)'s spot and (n k+1)'s spot, you'll see that (n+1 k+1)'s spot is right below them. That, combined with (0 0) = 1 (For the very top of the triangle), lets this relation exist.

      As an example: For the 5th row, 3rd element, we have (5 3) = 5! / (3! * (5-3)!) = 5! / (3!2!) = 5*4*3*2*1 / 3*2*1 * 2*1 = 5*4 / 2*1 = 5*2 = 10, and 10 is indeed the 3rd element of the 5th row (Remember, the top row has n = 0 and the first element of each row has k=0).

      Here's an image showing how the (n k)'s are arranged:
      http://i.imgur.com/C9mbD.gif
      (61 votes)
  • duskpin tree style avatar for user Faith Patterson
    I actually used the spiraling number game and instead of circling the primes, I circled the even numbers and connected each circled number. If you do this you get a weird square spiral. This works with circling odd numbers too.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • female robot grace style avatar for user Jasmine
    Why do pascels triangle show up so much in math?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • marcimus orange style avatar for user GabbyRoche
    im a person and i was wondering how vi hart can talk so fast is it genes or is it fast forward or is it ?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Andrew
    Who is Stanislaw Ulam?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seedling style avatar for user Bhagvati Joshi
    wow! this is really fun because we learn and play and doodle! i am obsessed with doodling in my science homework
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine sapling style avatar for user Jermiah
    My question is is how does she draw so perfect with both hands?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine sapling style avatar for user jessegjr722
    How much wood can a wood chuck chuck if a wood chuck could chuck wood
    (3 votes)
    Default Khan Academy avatar avatar for user
  • female robot grace style avatar for user Alexandrea (Alex) Wright
    When she was doing "Pascal's Triangle", did anyone else notice that the red parts she colored in looked like Mickeys?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • female robot grace style avatar for user PinkSmarty
    At , did she choose Ulam for any specific reason? Is he just a random person that she chose or does he have something to do with sick number games?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

Pretend you're me and you're in math class. Actually... nevermind, I'm sick so I'm staying home today so pretend you are Stanislaw Ulam instead. What I am about to tell you is a true story. So you are Stan Ulam and you're at a meeting but there's this really boring presentation so of course you're doodling and, because you're Ulam and not me, you really like numbers... I mean <i>super</i> like them. So much that what you're doodling is numbers, just counting starting with one and spiralling them around. I'm not too fluent in mathematical notation so so i find things like numbers to be distracting, but you're a number theorist and if you love numbers who am I to judge? Thing is, because you know numbers so intimately, you can see beyond the confusing, squiggly lines you're drawing right into the heart of numbers. And, because you're a number theorist, and everyone knows that number theorists are enamoured with prime numbers( which is probably why they named them "prime numbers"), the primes you've doodled suddenly jump out at you like the exotic indivisible beasts they are... So you start drawing a heart around each prime. Well... it was actually boxes but in my version of the story it's hearts because you're not afraid to express your true feelings about prime numbers. You can probably do this instantly but it's going to take me a little longer... I'm all like - "Does 27 have factors besides one and itself? ... o.0 ... Oh yeah, it's 3 times 9, not prime." "Hmmm what about 29...? pretty sure it's prime." But as a number theorist, you'll be shocked to know it takes me a moment to figure these out. But, even though you have your primes memorised up to at least 1000 that doesn't change that primes, in general, are difficult to find. I mean if I ask you to find the highest even number, you'd say, "that's silly, just give me the number you think is the highest and i'll just add 2.... BAM!!" But guess what the highest prime number we know is? 2 to the power of 43,112,609 - 1. Just to give you an idea about how big a deal primes are, the guy that found this one won a $100,000 prize for it! We even sent our largest known prime number into space because scientists think aliens will recognise it as something important and not just some arbitrary number. So they will be able to figure out our alien space message... So if you ever think you don't care about prime numbers because they're 'not useful', remember that we use prime numbers to talk to aliens, I'm not even making this up! It makes sense, because mathematics is probably one of the only things all life has in common. Anyway, the point is you started doodling because you were bored but ended up discovering some neat patterns. See how the primes tend to line up on the diagonals? Why do they do that?... also this sort of skeletal structure reminds me of bones so lets call these diagonal runs of primes: Prime Ribs! But how do you predict when a Prime Rib will end? I mean, maybe this next number is prime... (but my head is too fuzzy for now this right now so you tell me.) Anyway...Congratulations, You've discovered the Ulam Spiral! So that's a little mathematical doodling history for you. Yyou can stop being Ulam now... or you can continue. Maybe you like being Ulam. (thats fine) However you could also be Blaise Pascal. Here's another number game you can do using Pascal's triangle.(I don't know why I'm so into numbers today but I have a cold so if you'll just indulge my sick predelections maybe I'll manage to infect you with my enthusiasm :D Pascal's Triangle is the one where you get the next row in the triangle by adding two adjacent numbers. Constructing Pascal's Triangle is, in itself a sort of number game because it's not just about adding, but about trying to find patterns and relationships in the numbers so you don't have to do all the adding. I don't know if this was discovered through doodling but it was discovered independantly in: France, Italy, Persia, China and probably other places too so it's possible someone did. Right... so I don't actually care about the individual numbers right now. So, if you still Ulam, you pick a property and highlight it(e.g. if it's even or odd) If you circle all the odd numbers you'll get a form which might be starting to look familiar. And it makes sense you'd get Sierpinski's Triangle because when you add an odd number and an even number, you get an odd number. (odd + odd) = even and (even + even) = even... So it's just like the crash and burn binary tree game. The best part about it is that, if you know these properties, you can forget about the details of the numbers You don't have to know that a space contains a 9 to know that it's going to be odd. Now, instead of two colours, let's try three. we'll colour them depending on what the remainder is when you divide them by three(instead of by two). Here's a chart! :) So, all the multiples of three are coloured red, remainder of one will be coloured black and remainder of two will be coloured green. The structure is a little different from Sierpinski's Triangle already but I'm tired of figuring out remainders based of individual numbers, so Let's figure out the rules... If you add up two multiples of three you always get another multiple of three( which is the sort of fact you use everday in math class) However, here this means (red + red) = red. and when you add a multiple of three to something else, it doesn't change it's remainder. So, (red + green) = green and (red + black) = black. (remainder 1 + remainder 1) = remainder 2, (remainder 2+ remainder 2) = remainder 4 and the remainder of 4 divided by 3 is one and (1+2) = 3 remainder 0. (whew...) The bottom line is you're making up some rules as to what coloured dots combine to produce which other coloured dots and then you're following those rules to their mathematical and artistic conclusion... The numbers themselves were never necessary to get this picture. Anyway, those are just a couple of examples of number games that are out there but you should also try making up your own. For example, I have no idea what you'd get if you highlighted the prime numbers in Pascal's Triangle, maybe nothing interesting(who knows...) Or, what happens if, instead of adding to get the next row, you start with a two(and a sea of invisible ones) and multiple two adjacent numbers to get the next row. I've no idea what hapens there either or if it's already a 'thing' people do. (Hmmm? o.0 Powers of two...) I know another way to write this. Ok, that makes sense. Then there is also a thing called Floyd's Triangle where you put the numbers like this... Maybe you can do something with that as well. ... Man, it seems like everyone has a triangle these days... I'm going to take a nap... ZZZzzz...