Hacker News new | past | comments | ask | show | jobs | submit login
37, the median value for the second prime factor of an integer (grossack.site)
458 points by sacrosanct 10 months ago | hide | past | favorite | 210 comments



This doesn't mean there's anything interesting about 37.

Rather, the only interesting fact here is that a finite median here exists at all. Once you've established that, it's guaranteed to be some prime number, because we're defining the median of a list to be an element of the list. It just happens to be 37 for this list, but it may as well have been anything else.

What could make 37 interesting is if we relaxed the definition of the median to be outside the set itself (which is entirely possible), and yet the limit still, and it still converged to 37 somehow. That would be wild.


As we take the limit as N → ∞, the list continually grows larger. Thus, the number of instances of 37 continually increases, so that they occupy an asymptotically constant proportion (about 0.963%) of the values in the list; only ~49.061% of the values are less than 37, and only ~49.975% of the values are greater than 37. After a certain point, for even N, there will always be two instances of 37 surrounding the 50% mark in the list, so the median will still be exactly 37, and not some other value. I wrote up a longer explanation in another comment [0].

[0] https://news.ycombinator.com/item?id=38245162


Out of the integers 1..2N+1, exactly N have smallest prime factor 2,

while the remaining N+1 have smallest prime factor > 2.

Thus it is fair to say that the median smallest prime factor is 3 rather than 2.


Oops, that's not correct, since 1 has no prime factor.

We should instead look at the odd-sized range 2..2N, in which N elements have smallest prime factor 2, making 2 the unique median.

Only in even sized ranges 2..2N+1 is the median shared between 2 and 3.


In their original paper, De Koninck & Tenenbaum take the convention that the smallest prime factor of 1 is ∞, presumably on the grounds that the minimum value of the empty set is ∞. Under this convention, the range 1..N does make sense, with the median smallest prime factor being 3 for all N ≥ 3 odd, and 2.5 for all N ≥ 4 even. So formally, the limit as N → ∞ wouldn't exist.

(They further take the convention that the second-smallest factor of a prime number is ∞, but the choice is ultimately irrelevant for the median of the second-smallest factor, since the primes have natural density 0.)


While ∞ is indeed the minimum of the (empty) set of prime factors of 1, it's still not a prime factor, and it feels wrong to include it in median computations.


is it trivial that the series of medians for the second prime factor of numbers up to N is a specific number? isn't it just as plausible that this median would increase?


> isn't it just as plausible that this median would increase?

Every sixth number will have a factors 2 and 3. (so 3 is the second prime for 16.666% of numbers)

Every 10th number will have factors 2 and 5.

Every 15th number will have factors 3 and 5.

Of course then you have to subtract out every 30th number which contains a 2, 3 and 5.

They ignored duplicates and it would have been nice if they had defined "first" and "second" properly. Also note that a prime counts the 2nd factor as "infinite", adding one to the "above 37" bucket.

Anyhow, you add those up and it's easy to at least see that in any range of numbers it very quickly approaches 50%. Keep going to write out the Venn diagram and it happens to come out at 37. It's low enough, I assume it could even be done by hand.


The median of the first prime factor is 2


The sequence of the medians of successive prime factors would be interesting


But intuitively it’s weird that the median of the second prime factor is not 3, right?


Only multiples of 6 (1 in 6 numbers) have 3 as their second prime factor so I wouldn’t expect the median to be 3


I guess it depends on whether you count multiples of 4 to have 2 as both their second and first prime factor?


I'd expect the mode of the second prime factor to be 3, but not necessarily the median.


I'm curious about the first number to have absolutely nothing interesting to be said about it ;)



In short, it's not really a paradox because in the original joke, the assumption is that the first number to have nothing interesting about it is itself an interesting property. That assumption isn't true when you actually think about it...it's actually rather boring.


Well sure - the median is just one particular percentile - not a magically special one. The existence of a median also implies that there are probably limits for every other percentile - or, indeed, that for any number, there is some in-the-limit proportion of numbers for which the second prime factor is greater than that number (and for 37 that happens to be .5).


Yes, and in small cases you can work out the distribution explicitly. For example: - 1/6 of all have their second smallest prime factor equal to 3 (that is, they have a factor of 2 and a factor of 3) - 1/5 of integers have a factor of 5; of those, 1/2 have a factor of 2 or a factor of 3, but not both (that is, they're congruent to 2, 3, or 4 mod 6); so 1/10 of integers have second smallest prime factor equal to 5.

So the proportion of integers with second smallest prime factor equal to 5 is 1/6 + 1/10 = 8/30. Thus the first quartile of second smallest primes is 5, and similarly for any quantile between 1/6 and 8/30.

Don't ask me to work out the third quartile - this distribution has a really long tail. In particular I suspect the limiting distribution has no mean.


> It just happens to be 37 for this list

What do you mean by “this list” here? It seems to be misunderstanding the result.


Love it when an article so clearly explains the answer to my first burning question - in this case, "How in the world do you prove that?"


Interestingly, 37 also shows up in the Optimal Stopping / Secretary Problem.


I don’t know that problem and don’t feel like googling it, but it’s a reasonable guess that’s because

  1/e ≈ 0.36787944


That seems unlikely. Those numbers only look related in base 10. 1/e is about a third of 1 and 37 is about a third of 100, which is why they look similar in base 10. In base 16, 1/e is about 0.5e2d58 and 37 is 25.

And prime numbers are prime numbers regardless of base.


100/e is close to 37, regardless of base.

(That 100 would be chosen as a convenient scaling factor for our notion of “percent” only in base 10 is true, but a separate point.)


No, that is precisely the point.


That's what PP was saying, in not so many words.


And thanks to 1/e being 0.367, in Pokemon Go when I catch 1000 Pokemon and each of them has a 1 in 1000 chance of being shiny, I have a 36.7% chance of having zero shinies among them, or approximately a 63% chance of the reciprocate, AKA having at least 1 shiny among them.

1000 is arbitrary of course, but the bigger the number the closer to 1/e.

See "Bernoulli trials"


It's also the most common number picked when people are asked to think of a random number between 1 and 100.


Was just about to comment this. Wonder if anyone more mathematically inclined can see a relationship.


Coincidentally, 37 is also the first irregular prime. They’re why Fermat’s last theorem is hard.

https://en.wikipedia.org/wiki/Regular_prime


>0.000000000000000 of numbers have 2 as their second prime

Is the article title correct without explicitly mentioning "non-repeating"?


An important part of reading mathematics is mentally filling in the "correct" interpretation for terms. The optimal amount of detail typically depends on the target audience. Part of that is because making notation fully specified in English is typically cumbersome: If they had written "as their second non-repeating prime", someone could come along saying "shouldn't it say 'second-smallest' or 'in increasing order' as well?". In papers, the use of such terms would typically be accompanied by a formal definition using more precise (but not fully precise, see the talk below) mathematical notation.

I mention this not to be pedantic, but because inferring the "invisible" part of mathematics (when it can be done) instead of asking humans to do it explicitly tends to be a big usability improvement in theorem provers. Andrej Bauer has a nice talk about it at https://www.youtube.com/watch?v=wZSvuCJBaFU


Sure. I'm wondering what people would respond to blanket asking what is the second prime factor of 12, because I would say 2, not 3. So 37 being the median here was a bit jarring specially since "non-repeating" wasn't even mentioned in the article.


Good nitpick. If you allow repeating primes, then the numbers with 2 as their second prime would be multiples of 4. So a quarter of numbers.


And the number of 2s (and 3s) would grow hard, which not favor a finite median.


Alef 0 numbers have 2 as their second prime


The factors of 12 are 1, 2, 3, 4, 6, 12.

The prime factors of 12 are 2, 3.


Is there any interesting theorem or result from l-functions or modular forms that covers this result?

I am learning about them and I find the topic fascinating.

I discovered them watching https://www.peakmath.org/quest-for-f1 videos on youtube. Also worth exploring: http://lmfdb.org


I agree that this makes 37 somewhat interesting.

Certainly more interesting than - say - 31.

31 is a prime number too, and therefore somewhat interesting. But for sure not as interesting as 37, which as we just learned, is the median value for the second prime factor of an integer.

Any suggestions of integers which are even more interesting?

And while we are at it, is there an integer which qualifies to be the most interesting?


Mathematicians are locked in bitter struggle between the Zeroastrians who believe additive identity blesses 0 as truly the most foundational and therefore interesting integer, while the Unitarians favor multiplicative identity and thus champion 1. Uncountable souls have been lost to the conflict between these two groups.


We Pragmaticists (some would say "abject pragmaticists") advocate for a compromise solution between Zeroastrians and Unitarians by taking h=½ as the fundamental constant. It satisfies several interesting identities involving other constants, like i^i=e^(-hπ), ∫e^(x^(1/h))dx=π^h, ∑n^(-1/h)=hπ^(1/h)/3, the celebrated inequality (a+b)h≥(ab)^h or the curious fact that 1/h is the smallest prime number.


Pragmaticists brought a fraction to an integer competition and lost


they lost the competition, but in the end it was them who paid the prize


Ah, but they won the Pi versus Tau competition ;-)


Halfasstrians?


Ugh, must we relate every thread about integer fascination back to Zerry/Unny zealotry? It’s been going on for centuries now, nobody’s changing their opinion at this point.


I, for one, think zero good will come of it…

Two soon?


> It’s been going on for centuries now, nobody’s changing their opinion at this point.

Sure, but one side can still out-breed the other.


because numbers have a natural meaning. roughly speaking each integer has as many meanings as its value. so 0 and 1 are just the very beginning.

zero's natural meaning is special, it's the void. sometimes the 'variable' stands in as having this meaning, sometimes the variable is zero.

one is the easiest simplest to grasp. its meaning is "I", ego.

two is duality in the broadest imaginable sense. wars are being fought right now over the precise meaning of 3


The Tao Produced One;

The One Produced Two;

The Two Produced Three

And The Three Produced All Things.


Sounds very close to the firstness, secondness and thirdness categories from Charles Sanders Peirce.

(Which I think are nothing but nonsense from a madman =)


He was an awfully pragmatic madman. He also discovered the universal and existential quantifiers independently of Frege, albeit a few years later.

No offense intended, but to the extent his work feels mad to you, it might be a “you problem.” That said, he never did reduce firstness, secondness, and thirdness to unity to his own satisfaction either. His work is truly tantalizing.

Oh and abduction has had some conceptual influence too.

Sad that the Arisbe fansite got deleted.


I agree this must be a "me" problem.

I just have never found these three "universal" categories useful for anything whatsoever except for a semiotics class in university where he was one of the study subjects.

Umberto Eco on the other hand... every single thing he wrote was immediately interesting and useful.

Or funny. His Lolita's parody, Granita, was Pratchett and Adams levels of funny. He was awesome.


we can be more precise now:

the three produced the equation, which pretended that all things were (could be) equalized into equivalence. they called this algebra and parised some monotheistic god; they called this magic and GOTO one.


thats funny i always heard it was an origin with two other orthogonal roles

unless youre a dirty filioquist


Perhaps 0 and 1 are the same. If there only exists the entity called 1, lacking all properties or relations to other entities, what is left? A void called 1, no different than 0. The true mystery is: how did plurality arise?


> Perhaps 0 and 1 are the same.

Compare https://en.wikipedia.org/wiki/Field_with_one_element


This feels closer to a tarot reading than mathematics, and I’m here for it


Consider for a moment that Aristotle, and thus most likely all the ancients, made a distinction between nothing and void.


My favorite is 2: Shared joy is a double joy, and shared sorrow is half sorrow.


I've always felt 2 was the most important as well, if only because for there to be something (1) there has to be nothing (0), and thus the existence of anything defines 2 states, being and non-being. Without the pair (0, 1) there is no distinguishing anything in the universe.


My spouse often claims that two is the best prime because she knows it annoys me. Or perhaps she is truly insane. Clearly 2 is the WORST prime, amirite?


Well, it's definitely the primest prime.


In modern math all numbers are built on set theory which has the empty set as it's foundation.

Empty set is more like 0 than 1. Check mate Unitarians.


The empty set is 1 set. Can’t have 0 without 1.


The empty set is the set with nothing, i e. no thing. So it doesn't need 1.

;)


>> The empty set is the set with nothing

So it is A set. In fact it's "the set" that makes it a rather special one.


Wouldn’t the set without nothing be more fundamental?


Brilliant. Go to the top of the class, er, set. Oops, forgot, sets have no order. List, then.


Ordered list, I mean.


Does the set of sets that exclude themselves exclude itself?


No, because it isn't a set, but rather a class.


A concept created at least partially to resolve this paradox.


That's a well-known old paradox, or close. Good on you, cobber. (AU slang :)



You start from 1 empty set though.

If you could start from 0 empty sets, you'd have a point.


If I start from 0 empty sets, how do I have A point?


>You start from 1 empty set though.

Sez who, zigactly? If you are coldtea, I am coldertea. As in, I love my tea colder than you do yours. And starts who? Not me.

Don't kid around, dude. I dik around.

>If you could start from 0 empty sets, you'd have a point.

What if the set of empty sets has no element? :)


Was the first comment under the influence of drugs?

In any case, for the second comment: even if the set of empty sets has no elements, it's still ONE set.


>Was the first comment under the influence of drugs?

No, it was not. Regarding this whole subthread in which I participated, I did it for some mutual logic-chopping fun.

But if you thought there was a chance it was, you shouldn't have replied to the second comment, because I would have been equally under the influence of the drugs for the second, if I had been so for the first comment. (Don't reply to a druggie.) After all, they were both done in one atomic comment transaction.


No. Set theory is just one possible way you can build up numbers and mathematics.

You can just as well build up numbers and the rest of mathematics from different foundations. They are all equivalent.

Just like running your programs on ARM or on x86 or a toaster is all the same, thanks to emulators. (That's assuming you have an arbitrary amount of memory, and don't mind differences in runtime length.)


Which is more foundational: the wheel or the axle? Sets aren't worth much if you can't take unions, which is where 1 comes from.


0 and 1 are interesting as integers in the same way that a blank canvas is interesting as a painting. Very foundational, very useful but also very plain.


In my limited math experience, I really found an appreciation of the number one. My favorite part of high school algebra was realizing that "solving for x" was often just a repeated exercise of multiplying each side of the equation by a "clever form of one."


Solving for x often entails multiplying both sides by the same number, not necessarily one. Perhaps you're referring to simplifying fractions where you do often multiply by a clever form of one?


Ah, yes, you are absolutely correct. The _clever form of one_ trick did not apply as often as I recalled!


Pretty interesting if you work in an industry where you use them to represent every other number.


not in binary notation they're not


Must be an integer number of souls, though, so even in a conflict of infinite time, it won't be uncountable.


One of my professors would often refer to this struggle as taking place between the Nihilists and Unitarians.


Surely addition is more foundational than multiplication? Multiplication is just repeated addition.


Is this a reference for some fiction? Or you just made it up?


ℵ0 uncountable?


You missed the Dualitarians, the Trialitarians, and so on through to the Infinitarians ... whoops, forgot Cantor!

https://en.m.wikipedia.org/wiki/Georg_Cantor


> is there an integer which qualifies to be the most interesting?

I’d say that 664571016291591957042161991109590159107314773607 and 590488317782859198927092718316232684864014739572 qualify, which are the big- and little-endian versions of ASCII “the most interesting”, respectively.



Like the Original Sin entered the Garden of Eden through the Serpent, mutable state breaks the time-invariant perfection of mathematics through the idea of interestingness, since it's clear the least interesting things only remain so until someone notices.


Well, that is about the question which is the most uninteresting number. And the paradox that - whichever number it is - this attribute makes it interesting.

But since we are not looking for the most uninteresting number, but the most interesting one, we do not have to fight with issues of that calibre.


True, but you must still contend with your observational influence. Whatever number you crown as "most interesting" will become even more interesting for wearing that crown!

So you must take this duty with extreme care and thoughtfulness, for when you anoint such a number, your action may crystalize it as such for all eternity. Other numbers will have to go further to supplant it.


I know it's a joke, but I still feel like it would be more meaningful if it wasn't so generic that it could kind of apply to anything. Like, there's nothing specific to numbers about the idea that the least-"interesting" item in some set is itself interesting for possessing that property.


Because it's numbers, which are sortable, you can ask which is the least member of a set. If a set of positive numbers doesn't have a least member, does the set exist?

There's a similar paradox which asks what the smallest number that can't be defined in fewer than thirteen words.

There must be some number, right? For instance, 7603201560, or "seven billion six hundred and three million two hundred and one thousand five hundred and sixty" seems to require 16 words. Maybe you can shorten it by removing the "ands," but I can come up with a longer number.

But if there were such a number, then couldn't we describe it as "the smallest number that can't be defined in fewer than thirteen words?" And then it just got defined in fewer than thirteen words. So it can't really be a member of that set.

So does the set have any members?


Then let's see who manages to write the least interesting comment in this thread.


The way I understood it, this formulation relies on induction on the natural numbers.


One other special property prime numbers can have is being irregular. And guess what the first irregular prime number is? 37. Interesting that it appears so late because irregular prime numbers do make up around 41% of all primes. See: https://encyclopediaofmath.org/wiki/Irregular_prime_number#:....

So the most interesting prime number really depends on what you consider more interesting. If you prefer the median second prime factor, then 37 is the best, but if you prefer the first irregular prime number then 37 is also the best. So it all depends on your perspective.

Another reason to like 37 is that it ends in a 7 so that it "sounds random" when someone asks for a number and it is better than 27 because it is prime. 7 is too low and 17 has connotations with bad luck. Although 37 is quite scary too: it's not just prime, which is pretty irregular, but it's also an irregular prime.


Historically, I'd say 60, because relative to it's size, it has many divisors (12), and among them a lot of useful ones (2, 3, 4, 5, 10), which is why our time system and trigonometry are probably based on it (360 = 6*60; 360 has 24 divisors).


I nominate 60. Babylonian mathematics was sexagesimal (base 60) which is a superior mathematical system to base 10. The number 60, a superior highly composite number, has twelve factors: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60, of which 2, 3, and 5 are prime numbers. With so many factors, many common mathematical operations are much simpler than in base 10. Base 10 has no special mathematical properties apart from as an accident of evolution, we primates ended up with 10 fingers.

We still have some vestiges of the babylonian system however, 60 minutes in an hour. 360 (6 sixties) degrees in a circle.


It is another accident of evolution that we ended up with 12 finger joints, allowing one to count to twelve with a single hand by tapping the thumb on each finger segment in turn.


Since small prime factor are so useful, why not use 2 3 times and 3 2 times along with 5

  2*2*2 * 3*3 * 5 = 360
360 is a very handy number, it has a high degree of usefulness, when you're circumferential in your calculations.


You're perilously close to being a eikositriophile. We try not to talk about such things openly fnord.

https://en.wikipedia.org/wiki/23_enigma


How is that related?


I was being mostly frivolous but there's a larger point.

23 is used in also sorts of numerological explanations and connections. And of course, there is no actual connection 99% of the time.

The "explanations" get very inventive by also considering 2 and 3 invidually, 2+3, etc. Doesn't take long to get something to pull the gullible in.


Most of your argument seems to stand for 30 instead of 60: 2 x 3 x 5 = 30, which is a smaller number with mostly the same properties as 60.

If you want more divisibility (into quarters, eigths, ninths...), you can continue multiplying further, but 60 is as much a "historical accident" as 10 is an "accident of evolution".


60 is a 'highly composite' number (https://en.wikipedia.org/wiki/Highly_composite_number) - it is the lowest number with 12 divisors.

30 has divisors 1, 2, 3, 5, 6, 10, 15, 30 - eight divisors. But 24 is lower and also has eight (1, 2, 3, 4, 6, 8, 12, 24), making 30 less 'special'.

60 is the lowest highly composite number with 5 (and therefore 10) as a factor, which makes it a strong attractor when choosing bases for measuring systems.


Sure, but caring about 5 (and 10) is not what the GP comment stressed (actually, quite the opposite). If we do care about 10, then 60 is indeed appealing, but also an argument for base 10 too — which they argued against.

"Highly composite" number being used as a base for a numbering system does not really strike me as non-arbitrary either.

Choosing 60 and saying it makes more sense than, say, 2520 (which is also highly composite, but divisible by 1-10 too) is pretty arbitrary imho. Yes, my "criteria" is similarly arbitrary but focused on "10 does matter" ("I want to easily divide this into 2-10 groups"): both are too large to have individual names for each digit in a supposed number system with base 60 or 2520.


Much as I appreciate the reference, I think the fact this limit exists at all and is an integer is more interesting than what the integer is.

A lot of paradoxes and confused ideas begin with "choose an integer at random" - what is the average value of number chosen between 0 and infinity, for example.


> and is an integer

How could a median prime factor not be an integer?


The median value of [1, 2, 3, 4] is 2.5


But the median of [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4] is 2. As the individuals observed values collect more and more repetitions—as they do when making a list of the second prime factor, for example—it becomes increasingly unlikely that the median will be between two values, not equal to one of the values.

It would be surprising if the median second prime factor was not a prime.


Sure, but 2 is the only even prime, so this is super constrained.


That's the mean.


And it’s also the median.


Depends if you are looking at a mean closed to integers or not: one can define a mean without rational or real numbers.


But it's not an integer before rounding. 37 is simply the nearest number to get approximately 50%.


I love that there could never be a least interesting natural number, because that fact would be interesting. In fact there can be no uninteresting natural numbers, because then you could list them, and the lowest one would be interesting for that fact.


17 is well known as the most random number between 1 and 20.


37 is also the smallest base (or second int argument) not supported by itoa(). Surely not a coincidence. ;)


It's because the characters in the result can be one of 10 digits or one of 26 letters.


Prime numbers are not especially interesting. E.g. all groups of prime size are cyclic. But each composite number has its own "character". The "interesting" number among primes is 2. Almost every theorem about prime numbers has to consider 2 as a special case.


Except that it's interesting that prime numbers have led inordinate numbers of individuals to devote uncountable but significants chunks of their lives investigating them.

It's not their fault that they're leftovers when an artificial grid is created by crossing-out every multiple of 2, 3, 5, or other prime numbers. Yet for some reason this seems to give them a fascinating aura for many. Maybe naming them 'prime' instead of 'leftover' is to blame.


I love the number 27 3^3 2+7 = 3+3+3


Very pretty. And to relate it somewhat to the topic: 1/27 = 0.037 repeating 037 and 1/37 = 0.027 repeating 027 :)


Every prime is odd and 2 is the oddest of them all!


The most interesting integer out there must certainly be the least interesting integer!


what is interesting to me is that we call imaginary integer numbers "Gaussian Integers", but we call the quaternion integer numbers "Hurwitz Quaternions" instead of "Hurwitz Integers".


Two is the oddest prime.


12

Smallest abundant number


12 is also the largest one-syllable number (at least in English).


I nominate 120 as "most interesting integer". For obvious reasons.


Um, it's not obvious to me. Could you specify?


The smallest triply perfect number? https://oeis.org/A005820


So many factors in such a small package, for one.


120 - or twelfty to friends - is a delight.

"The long hundred, also known as the great hundred or twelfty,[is the number 120 (in base-10 Hindu-Arabic numerals) that was referred to as hund, hund-teontig, hundrað, hundrath, or hundred in Germanic languages prior to the 15th century, and is now known as one hundred twenty, or six score."

https://en.wikipedia.org/wiki/Long_hundred

"120 is highly composite, superior highly composite, superabundant,[3] and colossally abundant. With sixteen divisors, 120 is the smallest number to have that many divisors..."

https://en.wikipedia.org/wiki/120_(number)


Amazing how simple the proof is. 37 is my new favorite prime number, haha.


I wonder what the growth rate of the mean of the second prime factor is? I guess I'd expect it to grow without bound, but maybe pretty slowly?


I've been obsessed with this number for most of my life. It's like I see it on every clock I look at, or on every license plate in front of me.

There are random things about it like channel 37 has significance: https://en.wikipedia.org/wiki/Channel_37


> If we write p_k for the median k-th prime, then they show: log log p_k = ...

is this natural log or some base?

why not to use ln to keep ambiguity out?


In analytic number theory we usually only care about growth rates in a very coarse sense- up to scaling by some constant, and asymptotically. Because the log of any base is precisely the same up to constants, it doesn't actually matter. If you look at the expression, to the right of the equals sign is a big O- that's the same big O as the one you might be familiar with in complexity.

That being said, in math more generally when we need a concrete log the natural log is pretty much always the way to go- I haven't seen ln in a little while.


> Because the log of any base is precisely the same up to constants

i.e.,

  \log_{b_1} n = \frac{1}{\log_{b_2} b_1} \log_{b_2} n
where

  \frac{1}{\log_{b_2} b_1}
is the constant fixed for a given choice of `b_1` and `b_2`, i.e., the bases.


except that in that formula _exact_ "k-b" is used - coarseness is hidden in O(1/sqrt(k)) that follows


Sheldon Cooper, the best number 73 (21st prime number), its mirror 37 (12th prime number)

https://www.youtube.com/watch?v=HacqfsV7ug0


I really dislike base-10 tricks. They are just cute, rarely have any deeper significance.


Also deep dive in the 73 and 37 https://www.youtube.com/watch?v=4DQndnAhdxk


given this knowledge, does this have implications that RSA would twice as crackable? Given casting a wide net, you could assume one of the prime factors is 37 and just try it against the pub key


Given that RSA primes are usually checked against some probabilistic primality test like Miller-Rabin, I would think the answer is no


This is one of the best articles I have read in a long long time!


I once heard of a (tongue-in-cheek) list of interesting facts about numbers, and I think it listed 37 as the first uninteresting number, but I guess that was wrong.


But what about the arithmetic, geometric or harmonic mean?


This is slightly interesting but I wonder what the median 3rd prime is, and 4th etc. Is there some sort of interesting pattern?


They grow very quickly. The median third and fourth primes are 42719 and 5737850066077 - see https://oeis.org/A284411 .

If p_k^* is the median kth prime then we have

log log p_k^* = k - C + O(1/sqrt(k))

where C is a constant around 0.59483; that is, p_k^* grows like exp(exp(k)). This is "Corollaire 1.2" of the paper that the post links to (https://tenenb.perso.math.cnrs.fr/PPP/p_k%28n%29.pdf). (It's in French.)


37 is one of the "scary" large numbers on countdown. The others being 12, 62 and 87.


No mention of 37 signals? Maybe the aliens are trying to test our math skills?


why is this kind of thing interesting? my undergrad math teachers were never able to convey that

is there something here to use this knowledge with? like cracking a lotto’s RNG by knowing a second prime probability? that would be interesting to me


I thought it'd be infinite or something. So it's cool to know it exists and it's not 1, 2 or infinity.


I don’t think this is _that_ interesting because the probabilities don’t add up to exactly 50%.

We have:

- the smallest prime factor of less than half of all integers is ≤ 31

- the smallest prime factor of over half of all integers is ≤ 37

So, clearly, the prime p where exactly half of all integers have something ≤ p as their smallest prime factor must lie between 31 and 37 :-)

Alternatively, one could argue such a prime doesn’t exist. That, I think, is the better answer.

That doesn’t imply there’s no good definition of that median, though because it’s 100% acceptable to have a set of numbers whose median is not an element of that set. https://en.wikipedia.org/wiki/Median#Finite_data_set_of_numb...:

“If the data set has an even number of observations, there is no distinct middle value and the median is usually defined to be the arithmetic mean of the two middle values.[1][2] For example, this data set of 8 numbers

1, 2, 3, 4, 5, 6, 8, 9 has a median value of 4.5”

So i guess the hunt still is on for a good argument as to why a non-prime such as 36 or even a real such as 36.716… should be called the median of the smallest prime factors of all integers (I wouldn’t know whether that exists)


As the author says, this isn't the median of any particular data set, but the limit of the median as the number of points goes to infinity:

> "Obvoiusly" there's no uniform distribution on the natural numbers, so what does it even mean to choose a "random" one? The way the number theorists usually solve this problem is by fixing a large number N and looking at the probabilities when you pick a random number between 1 and N. Then you look at the N → ∞ limit of these probabilities.

And by using the λ₂(p) function, we can find the asymptotic proportion that each prime p appears in the data set: if the set has N items, then approximately λ₂(pN of them will be equal to p, and the actual number will asymptotically approach this approximation. Given this, we can look at the set in terms of the proportions of its elements. We have first, P(p < 37) = λ₂(2) + ... + λ₂(31) ≈ 0.49061; second, P(p = 37) = λ₂(37) ≈ 0.00964; and third, P(p > 37) = 1 − P(p < 37) − P(p = 37) ≈ 0.49975.

Thus, if we sort the set with N data points in ascending order, we'll ultimately see 0.00964·N instances of 37, flanked to the left by 0.49061·N values less than 37, and to the right by 0.49975·N values greater than 37. For N odd, the median is defined as the value at the 50% mark in the sorted set, which is clearly 37. For N even, the median is defined as the mean of the two values surrounding the 50% mark; since 0.00964·N → ∞ as N → ∞, there will eventually be at least two instances of 37 around the 50% mark, so the median will once again be 37. Thus, for N even and odd, the median will always end up at 37.


An unknown thing becomes a non obvious thing, which makes it interesting. Until it becomes obvious, of course.


The interesting thing is that this feels like a thing that it would be extremely hard to know, and yet we found a way to show it to be true.

Many much simpler and more intuitive statements about primes and their distribution are beyond the grasp of modern math to prove or disprove.


Very interesting question. I thought a lot why some math facts seem boring to me while others are interesting, sometimes exciting.

I believe interesting math facts are interesting because they clash with intuition. Like you expect some freedom for a second prime factor to be anything it likes, but no, it has a very small median.

I misunderstood the claim at first, counted primes in reverse order and was really surprised by an idea that second largest prime factor is so small and started to think of Eratosthenes but continued to read. When I discovered my mistake and then it came to Eratosthenes it got almost obvious and not interesting really, I didn't even read it when it got techical. Though if not my disappointment I'd probably found it interesting, because while I believe I could find 37 as a median and prove it without any hints, I would need a nudge: I needed to be told that median of a second prime factor is a small number.

I believe that the practice of noticing these confusions and resolving it is a basis of a mathematician's mind. As a mathematician you need a highly tuned intuition that matches real theorems, because you start with intuition, formalize it as a theorem and then you look for a proof.

Intuition guesses theorems to prove or to look in literature. But if my intuition can be surprised by some fact it means it cannot guess it. And probably it cannot guess a lot of other related facts.


there are people that think math is a chore - and then there are people that think math is a game

for the second kind of people (like me) these "interesting facts" are fascinating even in otherwise uselessness


I mean this is a crazy thing to know about 37. And we know it!


you assume practicality in higher mathematics? thats like ancient Babylonians complaining about the impracticality of "calculus"


Question, has anyone tried Transformer networks for predicting prime numbers?


That would be an incredibly expensive way of generating prime numbers, far more expensive than just checking to see if it has any factors.


I was just hoping that we can extract some useful patterns from reverse engineering the trained network


What is the association between good passwords and prime numbers?


There shouldn't be a direct association, are you referring to something specific? Choosing a good password is about making it less predictable.

Prime numbers do factor into cryptography though, they use prime numbers for key generation and key exchange.


I'm more curious as to why prime numbers are so important to encryption, like what is their role or significance to the process


But don't use a prime number as your password ;-)


Do passwords eventually break down into some simpler representation tho? Like doesn't some hash function convert it irreversibly into some other number?


there is no such thing as a good password. I have heard of good SSO's though


WHO hurt you :[


2.5, the median value for the first prime factor of an integer


Probably not. We are talking about some function of first N numbers and its limit when N approaches infinity. There is more than one reasonable way to clarify "first prime factor" and "first N numbers", but I think for all of these reasonable definitions the median diverges, having different subsequential limits for even and odd values of N.


I'm taking the median of the limiting distribution, and I agree that the sequence of medians you describe does not converge.


How so?

1 has no first prime factor so must be excluded along with 0. 2 is always >=50% of the head sequences of the rest:

2 3 2 5 2 7 ...


Well, this is just in time for a few birthday card ideas...


It was a bit difficult to grasp at first, but it clicked after realizing it's all primes up to 37, not just 37. Kind of a neat fact, and I enjoyed reading this. Thanks for posting!


I don't think that's right. My reading of it was that 37 is the median prime among all primes.


I think you’re both expressing the same concept :)

37 is the median factor, it doesn’t mean that 37 is the actual second prime of 50% of numbers. The OP probably missed “median”, I know I did


Original comment said "all primes up to 37" which isn't correct there's no point where 37 is being used as an upper limit


I think that was an intuitive and imprecise way of expressing “median value”, so that 50% of primes are “up to 37”


Im going off what the article originally said:

"We see that 37 is the prime where roughly half of all numbers have something less than or equal to 37 as their first prime! So we’ve proven that 37 is the median second prime!"


did the title change or smth?


> it's all primes up to 37

Can you elaborate on "it" in this sentence? What is "all primes up to 37", when you phrase things in an easier to understand way?

I can't tell if you're suggesting the word median is being used in a misleading way? But it's basically the definition of "median 37" that half your numbers are "up to 37".


I admit I read it wrong at first, but it made sense to me at the end of the article. So I don't believe median was misleading. My initial thought was, as numbers get larger and larger, the chance that the second most common prime factor is 37 so 50%, which didn't make sense because of how common 3 and 5 are. By the end I realized the function is taking into account the range of prime factors as an aggregate.

Now I understand that with enough composite numbers, the chance that their second prime factor is 37 OR BELOW converges to 50%, which is pretty neat.


isn't 37 the solution to the toilet problem, as well? i'm supposing the two problems are related.


It's very unlikely that they are related. 1/e which is approximately 0.37 is the solution to the problem you're referring to but the occurrence of 37 depends on the choice of base. It just happens to be the case that in base 10 we find that round(1/e*10^2)=37 but it would be different in other bases.

Meanwhile, the median value for the second prime is completely independent of the choice of base.


That’s the age that Jesus Christ died


Reminds me of "move 37" made by Alpha Go:

> Michael Redmond noted that AlphaGo's 19th stone (move 37) was "creative" and "unique". It was a move that no human would've ever made Lee took an unusually long time to respond to the move. An Younggil called AlphaGo's move 37 "a rare and intriguing shoulder hit" but said Lee's counter was "exquisite". He stated that control passed between the players several times before the endgame, and especially praised AlphaGo's moves 151, 157, and 159, calling them "brilliant".

https://en.wikipedia.org/wiki/AlphaGo_versus_Lee_Sedol


forgive my lack of maths to support the intuition, but as we discover ever higher prime numbers the second factor will tend upwards - towards the correct answer of 42?


No, this is not an empirical result. The interesting thing is that this is a fixed number (and that it's quite small). ("After all, about half of *all* integers have 2 as their smallest prime factor" is the beginning of the intuition needed I guess)


it's more that when you filter out 37-and-below, the "rest" category as a whole takes ~50% of the numbers


nothing worse then when a good joke goes unnoticed.


the tears of clowns...


42 must mean both 41 and 43 taken together. these two primes are a twin prime above 37. and 29 and 31 both take together mean 30. the twin pair below 37



I find it very odd that wikipedia exists up to and including 11, but then does not exist at 12. Any reason for this?



Haven't checked, but a simple reason may be that no one created the pages for some other numbers. After all, it is a volunteer project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: