Earlier quoted context omitted.
Looks like there's 8,363 5 digit primes, from 10007 to 99991, so about 1 in 11
Why isn’t 00002 your lower bound?
Primel – guess a 5 digit prime number – each guess must be a prime
71–80 of 139 posts
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#72Re: Primel – guess a 5 digit prime number – each guess must be a prime
#73Earlier quoted context omitted.
You want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.
Hi, can you provide some search terms that will help me understand the relationship between ln and prime density?
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#74So are people just really good with numbers? I don't know any 5 digit primes nor do I know a way to calculate them on the fly.
Unlike Wordle, I assume it's unreasonable to expect a player to know primes so I don't think I'd call this cheating.
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#75My side-project this week has been searching for an optimal Wordle strategy. I figured it would make a great blog post but I haven't got that far yet. Step 1 is to find an optimal starting word. My most insightful finding so far has came from trying to define a cost function for comparing potential starting words. It turns out that "% of potential guesses [not] eliminated" is an excellent loss function. Importantly,…
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#76Earlier quoted context omitted.
You want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.
Hi, can you provide some search terms that will help me understand the relationship between ln and prime density?
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#77Earlier quoted context omitted.
You want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.
Hi, can you provide some search terms that will help me understand the relationship between ln and prime density?
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#78Also, the following script might help to make the game more accessible (or to help you cheat :P) -
// note: game doesn't seem to automatically clear at the end, so in the dev console use:
// window.localStorage.clear();
// then refresh the page
const prime = n => {
for (let i = 2, s = Math.sqrt(n); i 1;
}
const generateNums = digits => (
m => [...Array(9 * m).keys()].map(i => i + m)
)(Math.pow(10, digits - 1));
const generate5DigitPrimes = () => generateNums(5).filter(prime);
const all5DigitPrimes = generate5DigitPrimes();
// updated to take an optional array (defaults to all5DigitPrimes)
// this means you can chain the check function to do things that normal regex can't do
// e.g. check(/some_regex/, check(/some_other_regex/))
const check = (r, a = all5DigitPrimes) => a.filter(p => r.test('' + p));
Usage:paste the above code into the dev console
type 'all5DigitPrimes' and press Enter to see a list of all 5-digit primes
type 'check(/some_regular_expression/)' to see a filtered list of primes that match your regular expression
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#79Earlier quoted context omitted.
log(100000) is 5, so approximately 1 in 5 numbers below 100k is prime. Obviously those in the range 10000-99999 are less dense, but primes are still surprisingly common.
You want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.
Re: Primel – guess a 5 digit prime number – each guess must be a prime
#80Earlier quoted context omitted.
log(100000) is 5, so approximately 1 in 5 numbers below 100k is prime. Obviously those in the range 10000-99999 are less dense, but primes are still surprisingly common.
You want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.