Is This Prime?
isthisprime.com
isthisprime.com
First, memorize all the two-digit primes. 25 numbers isn't that hard to memorize.
Then, tell someone "Oh, I can instantly tell whether a number is prime or not. Give me a number, I'll tell you whether it's prime."
If they tell you a number between 1 and 100, use your memorized list. Otherwise, it's a game of cold reading; if they just generated a random string of many digits, there's a low chance that the number actually is prime. "21923847" is a keysmash, and it's almost certainly not prime, because the frequency of primes goes down as numbers get bigger. And most people will ask you a number, hear "no", and then go check the number's primality. Eventually, they'll look up a number in advance; that number is almost certainly prime.
I also like to make these small web mini games on the side. Here's one where you guess the year that famous events happened: https://guess-the-year.davjhan.com/
function c(){is_prime(document.getElementById('n').textContent)==="prime"?yes.click():no.click();window.setTimeout(c,1)};c()
My old laptop can guess right 16k times and get up to 4172973243025599, but then the http post to do the stats (record.php) bombs with a MySql error "Out of range value for column 'end' at row 1" :)+1... I lost two games in a row, both times on 91.
It's easy to determine divisibility by 2, 3, 5, and 11. 7² is also easy because it's a square. 7×13=91 is the only composite number under 100 that isn't caught by these rules.
It's easy to try 'divisible by 5' (ends in 5 or 0) and 'divisible by 3' (sum of digits is divisible by 3). 91 isn't found as prime by those two tests, so it needs the extra exceptional rule.
51 is #1, then 57, then 1
The "looks prime" rule assumes you check for multiples of 3, so that removes one.
All the rest end in an even digit or 5.
91 is not a prime
that one trips me every time.Curious if that is common in other countries?
That is (after consulting a table), 1 decillion - 1.
I clearly come from from a short scale culture. If I switched to the long scale and Chuquet names I could, of course, go to 999 nonilliard, 999 nonnillion, 999 octilliard, etc.
There were a few sets of common numbers, formulas, and mental calculation tricks that were useful to just always have in the back of your head. Perfect squares and cubes under 1000, powers of 2 and 3, prime numbers below 100, interior angles of regular polygons up to 10 sides, binomial coefficients, Pythagorean triples, factorials up to 9!, common roots out to 3-4 decimal places, and a few others that I've no longer needed for almost 20 years at this point.
Now I, even I, would celebrate
In rhymes unapt, the great
Immortal Syracusan, rivalled (sic) nevermore
Who, in his wondrous lore,
Passed on before,
Left men his guidance
How to circles mensurate.So a solid majority of all computer users.
It's interesting to compare the game play and design. My game is written in Elm and open source if anyone is interested. This website has keyboard inputs (y or n) which is a good idea. My game only does click/touch inputs.
If tomorrow someone discovered a closed-form equation for the nth prime, how would mathematics/the world change?
Any major step towards understanding them (such as a closed-form equation for primes) would have major mathematical knock-on effects which may or may not undermine these methods, or provide us with a basis for even stronger cryptographic mechanisms to make use of in the future.
That's not true of elliptic curves.
A cool thing about breaking a number into multiplicative atoms (the "prime decomposition") is that to multiply two numbers, you can just add up however many copies there are of each atom. Primes turn multiplication into addition in this way. In other words, each prime defines a sort of logarithm that measures the amount of that prime in a number, and knowing the "coordinate" in prime space is enough to determine the original number.
Then one might wonder what is the relationship between primes and addition. When you add two numbers, the prime decomposition of the result seems to be dramatically different from the decompositions of the summands. But there are patterns, like how the sum of even numbers is even. The abc conjecture[1] has to do with one of these patterns.
The relative order of the primes also is saying something about the relationship between addition and multiplication, since addition underlies how you compare two numbers. There are old results about the density of the primes as if they were following a random distribution.
I'm not sure if there's any deep structure that Recamán's sequence has anything to do with. All that seems to be interesting about it is that it evades our capabilities of determining whether every number eventually appears. The Collatz conjecture is similar in this way, though it is further complicated by the fact that it mixes the structures of multiplication and addition.
[1] https://en.wikipedia.org/wiki/Abc_conjecture
Going deeper, in algebraic geometry, what you do is take various number systems (called "rings" -- the integers are an example of a ring) and pretend each element is a function that measures some scalar quantity about an associated space. It's a bold and wild idea. There is a process by which you can figure out what the points of this associated space are, and, at least for the integers, there is one point for each prime. If you think about an integer n as a function defined on this space, then the evaluation of n at the point p ends up being equal to n mod p. All I'm trying to say by bringing this up is that primes are not just aesthetic, they have deep significance, with many analogs in other kinds of mathematics.
Btw, that kind of exists. There's a formula that produces nothing but prime numbers. It basically encodes sieving, and it coincidentally uses every letter of the English alphabet.
https://en.wikipedia.org/wiki/Formula_for_primes#Formula_bas...
In algebra, the integers mod p are a finite field (addition, subtraction, multiplication, and division are defined) if and only if p is prime.
Primality in algebra also exists in a more general form with prime ideals. An ideal is the set of elements of a commutative ring in which any element of the ideal multiplied by any element of the ring is still in the ideal; there is a sort of 'closed' property. Even numbers form an ideal because if you multiply any number by an even number, you get an even number. For a prime ideal, if ab is in the ideal, a is in the ideal or b is (similar to how if a prime number divides ab, it divides a or b).
They have a number of interesting properties. For example, for a ring homomorphism (a function from one ring to another that preserves relationships between elements of the two rings), the pre-image of a prime ideal is also a prime ideal.
Remember finding the common denominator in school, or reducing fractions to their lowest form. both require guess work to do the normally taught way, but both can be achieved using prime factorization in a "set" way that resolves to a solution.
I struggled in grade school to do fractions purely because of reducing and common denominators, but ended up tutoring people how to do them in college pre-algebra because thats when I learned about prime factors and what you can do with them.
If i had learned algebra before basic fractions i likely wouldn't had needed to dropout of high school and get a ged.
https://github.com/alexlieberman/Prime-Numbers/blob/master/S...
Today, at 56 years wise, I scored 34, so 90 > 80. Means I judge myself to be smart enough to put my shoes on the correct feet, still.
def is_prime(n):
return not True in [n%x == 0 for x in range(2, n/2)]even better you only need to test the primes <= floor(sqrt(n))
For smaller numbers see various prime sieves (Atkin, Eratosthenes)
Storage I have a harder time wrapping my head around. Aren’t primes quite sparse at cryptographic magnitudes? And are the primes used for (say) 256-bit encryption about the same magnitude, narrowing the dimension of storage required?
For RSA one typically use 2048 or 4096 bit primes.
I wonder if the text could be dropped once it starts. I found myself reading it each time which ended up distracting me a little and sometimes I would rush and tapped the opposite of what I intended.
Keyboard short cuts would make it a bit better.
This made me sad :(
For example, it's more convenient to write "every integer greater than 1 is a unique product of prime numbers" than to say "every integer greater than 1 is a unique product of {prime numbers excluding 1}"
(That's the fundamental theorem of arithmetic https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithme... .)
1 is non-prime by definition.
You correctly sorted 17 numbers.
https://www.youtube.com/watch?v=xKrn5bHn-d8 - Mathman, from the PBS series "Square One Television". A Pac-Man spoof. In this one Mathman must only eat primes.
This makes the concept of prime numbers much more useful when one is excluded.
I don't dispute that, by definition, 1 is not prime, but I don't see how this statement would follow if we considered it prime.
Edit: it seems more like it would be that every factorization would implicitly have 1^n tacked onto it, and while that isn't exactly useful, it doesn't break the game.
Let's call a number an Igelau prime if it is the number 1 or a prime number. Then an Igelau prime factorization of 15 is 3⋅5. Another Igelau prime factorization of 15 is 1⋅3⋅5. Another Igelau prime factorization of 15 is 1²⋅3⋅5. And so on. There are infinitely many Igelau prime factorizations of 15, thus there is no uniqueness.
Edit: Clarifying what Igelau primes are.
Endlessly saying "primes other than 1" gets kind of tedious.
Speaking more formally, a natural number p is a prime if and only if:
a) p > 1
b) for any natural number n satisfying 1 < n < p, p mod n ≠ 0