Live data from Hacker News

Primel – guess a 5 digit prime number – each guess must be a prime

converged.yt

131–139 of 139 posts

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#131
post #111

Earlier quoted context omitted.

Ah you're correct. Annoying how Google interprets log(x) as base-10 (but more shame on me for not realising that e^5 is obviously not 100000). In my experience everyone uses log and ln interchangeable outside of lessons at school.

log(x) historically conventionally defaults to base-10. https://en.m.wikipedia.org/wiki/Common_logarithm

As the wiki page itself notes though:

> On calculators, it is printed as "log", but mathematicians usually mean natural logarithm (logarithm with base e ≈ 2.71828) rather than common logarithm when they write "log".

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#132

My 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,…

I went to the source code of wordle & copied all 12000 words to an excel sheet Column A, starting from row 4.

3rd row for next 18 columns has drop down filter.

You guess any word with at least 2 vowels, if 3 better, no repeat letters. You get some grey, some yellow, some maybe green.

2nd column to 6th column on excel sheet is the Grey Letters, Not Found in Answer. In this, 2nd row, if u find any grey you type it here. The formula from row 4 downwards in this group checks if its top input cell is empty, if yes, true, if not empty, then it check if that letter exists in its row cell of column A. If exists, false (grey means no letter), otherwise true.

Column 7th to 11 are yellow. Same thing, row 2 gets input, 4th row onwards checks if this exists in Column A cell, true, otherwise false. If input cell empty, then True.

Column 12 to 16 gets green letter input. Here input goes by position, if 2nd letter is green, you type it in 2nd column of this group, which is 13th column.

Formula in 4th and next checks if input empty, true, otherwise if input exist in exact position, true, otherwise false.

17th column is empty & narrow, to create a gap.

18th column returns 0 if any false found in while row. Any false means this word is not the answer. Otherwise returns 1.

A separate one cell counts all those 1, tells me how many potential answers are. After every try/word, one can filter this last column on 1.

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#134

97501 and 24683 will get you all of the numbers (and maybe some position matches), from there it becomes much easier.

Enable "hard mode" in a future release, which, like Wordle's hard mode, rejects any guesses ruled out by previous answers.

I'm not seeing a hard mode option today.

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#135

The prime detection is broken. I tried 00002, 00005, and 00031 and it said those aren't prime even though they are.

It says they aren't 5 digit primes. 2 and 5 are 1 digit primes, 31 is a 2 digit prime. Putting extra 0s in front of them doesn't change that.

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#137

My first inclination was to write a solver :) https://gist.github.com/nickponline/9a3fb1ee5333c52ed195625e...

Nice solver! I did optimize the sieve a little...

N = 100000 primes = [False, True] * N // 2 for i in range(3, N, 2):

    if primes[i]:
        k = i ** 2
        while k 

Re: Primel – guess a 5 digit prime number – each guess must be a prime

#139
post #137

My first inclination was to write a solver :) https://gist.github.com/nickponline/9a3fb1ee5333c52ed195625e...

Nice solver! I did optimize the sieve a little... N = 100000 primes = [False, True] * N // 2 for i in range(3, N, 2): if primes[i]: k = i ** 2 while k

N = 100000 prime = [False, True] * (N // 2) primes = [] for i in range(3, N, 2):

    if prime[i]:
        primes.append(i)
        k = i ** 2
        while k 
useful = [ str(i) for i in primes ]

# Enter your clues

for i in useful: if i[0] == '6' and ('3' in i) and len(str(i)) == 5: print(i)

Post reply on HN