You are not logged in.
Hi K_R;
I've done 16, 20 & 25, but that'll do me for now (bed time).
I used M for all three, with #25 taking the longest. For that one, I initially found a solution with a For loop, but then a better one with M's Fibonacci function, which I didn't know existed until it occurred to me that it might.
I suspect that rounding might come into this...
I've never heard of error intervals, but rounding is uppermost in my mind atm because I'm working on a tricky problem where rounding is critical in finding solutions.
Hi again, Relentless! Still 'Keep_'-ing the old name going, I see.
Yes, I thought you were you, your username being a good clue; + your use the other day of 'M' for Mathematica, the abbreviation that bobbym and I used frequently in our many conversations...and maybe you did in yours with him too.
We met in several threads about 8 years ago, one being The missing dollar (& the 2 extra dollars). Well, the sad news since then is that my HP 32SII that I based the puzzle on conked out 3 years ago. However, I found an HP 33S (HP 32SII's successor) for only $35, and all's happy again.
Welcome back!
Problem 6 looked really easy so I solved it first.
Yes, that fell into place quite quickly in Excel.
M took me a bit longer to suss out, though.
I did problem 5 with Excel too
Edit: Problem 4 as well.
I couldn't think of an easy enough way in Excel, so went with M.
I did problem 2 on Excel too, manually. There are only 32 terms of that Fibonacci sequence less than four million.
Yes, I solved it with Excel...and just now in Mathematica.
By the way the website asks you not to post the answers.
I'd overlooked what you said there. I haven't posted any answers as such, just code...but running the codes will give the answers.
Shall I continue posting the way I have, or change somehow?
From their website:
"Who are the problems aimed at?
The intended audience include students for whom the basic curriculum is not feeding their hunger to learn, adults whose background was not primarily mathematics but had an interest in things mathematical, and professionals who want to keep their problem solving and mathematics on the cutting edge."
I fit into the italicised category.
Edit 28/9/2024: I didn't feel right about posting code, so I've now deleted them.
A way to do problem 8 occurred to me. Let's give it a go.
Edit: Problem 8 done. Still no coding used.
I solved it in Excel (spreadsheet), and this morning I worked out an M solution.
I did problem 1 on Excel....So ideally this question should be answered by programming.
I coded it up in LibertyBASIC.
No clever maths, just loops...which is all I can manage this time of night!
Problem 11 could be done on Excel but I think it would take annoyingly long if I'm not missing something. I'm going to go ahead and guess that it's the diagonal 89 * 94 * 97 * 87.
That's what I got, using Excel.
Copy/paste into Excel via the Wizard refused to work, but first pasting into Notepad++ and then copy/paste from there woke the Wizard up, and the grid copied over properly with the numbers in their respective cells.
That helped greatly with finding the solution via formulas that I could copy/drag with the fill handle.
Problem 12 done with Mathematica. Would be very surprised if it could be done with Excel.
Yes, I'd also be very surprised, given the huge numbers. But maybe an Excel whizz could...
I also solved it with M.
Verified the solution in Excel via a UDF that gave all the divisors, and a formula that counted the number of divisors. Both helps were found on the net. Also, I needed the triangular number from the M solution because of the huge numbers.
10. The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million.
Problem 10 done on Mathematica.
Found quite a neat 1-liner (with 4 functions) solution in M. Verified the solution in Excel.
I got problem 9 with a mixture of Mathematica and Excel.
In case there's a way of explaining what M spit out regarding problem 9, I will share its result:
Your 500(2-√2)<b<500 is close to what I did, but I don't understand the other two. Sorry.
I solved it in M, using my BASIC strategy which was my first solution method.
Then I also worked out a not-too-tedious Excel solution.
Is it considered cheating if you use Mathematica?
I hope not, coz I've used it on a couple of Project Euler problems posted years earlier here on MIF...and I didn't give it a moment's thought then!
However, it did cross my mind that M's 'Prime[10001]' solution was borderline cheating!
By this criterion, if I understand the sieve of eratosthenes, to cross out the multiples of every prime, I have a (laborious) method I could potentially carry out on pen and paper. So it is not really a mystery how the computer arrives at the answer.
Agreed.
7. By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10001st prime number? [Without looking it up.]
Solved it in Excel, then with Mathematica.
And, just to keep my hand in with BASIC, solved it using Liberty BASIC (used the Sieve of Eratosthenes).
These ones are trickier. It might be time to actually start coding.
I agree...and I solved #9 with a small BASIC code a couple of minutes ago.
Hi Keep_Relentless;
I did #7 on Excel spreadsheet, but, after failing to come up with anything myself, cheated by using a UDF I found on the net that helped.
A way to do problem 8 occurred to me. Let's give it a go.
Edit: Problem 8 done. Still no coding used.
I solved it in Excel.
Hi Keep_Relentless;
Sorry...I wasn't thinking and replied in the 1-3 thread instead of here. So here's what we said over there:
Keep_Relentless wrote:I found problem 5 to be the hardest to do on Excel.
I just used a calculator for #5 (product of all primes 2 to 19, multiplied by 2³ and 3 for the missing 4, 8, 9, 16 & 20). That could also be done in Excel somehow.
Wow, you just used a calculator for #5? I made columns checking divisibility by every number up to 20 and searched for a good while. Found 46512 is divisible by 16-19, checked its multiples. Found a multiple divisible by every number 1-20 except for 11. Found the smallest one that fits 11 too.
But it was not as quick and easy as using a calculator!
I don't really know what I'm doing, but I made it this far.
And you had much more fun!
I went the LCM route...
Also solved it in M later.
I found problem 5 to be the hardest to do on Excel. Not sure problems 7-9 can be done on Excel. 9, maybe.
I just used a calculator for #5 (product of all primes 2 to 19, multiplied by 2³ and 3 for the missing 4, 8, 9, 16 & 20). That could also be done in Excel somehow.
I did #8 first coz it intrigued me most. I used Excel but found it rather tricky...doubtless there's an easier method I didn't see.
I'll give the others a go later when I have some more time.
3. The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143?
Hi Bob;
Using Excel I have found that the third number is divisible by 29 and 13 (but not 7 and 5 also not 13^2 nor 29^2)
Is the "third number" that you're referring to 13195?
If so, its prime factors are the "5, 7, 13 and 29" from Keep_Relentless's post: ie, 5 x 7 x 13 x 29 = 13195.
...or am I missing something there?
Hi Keep_Relentless;
For problem 3,
600851475143 is not divisible by 13 or 29. Looks like Excel has rounding errors.
In fact, seems there are no prime factors below 71.
I may not be understanding what you're trying there...
My Excel found 4 prime factors (the largest being a 4-digit number), and had no rounding errors.
I used a spreadsheet, with 600851475143 in A1 and my main formula in A2, which I dragged down column A quite a way, given the large task ahead.
Each time the formula found a prime factor, the prime factor divided into the dividend and the calculation continued down the column with the resulting quotient until the next prime number was found...etc, repeating the process all the way to the end.
I'm sure that a UDF would have done a quicker & tidier job, but I'd still be coding into tonight! That is, if I could manage that at all!
Hi Bob;
When I first joined the forum a command square brackets code could surround the math commands to stop the interpreter activating the commands. This allowed a poster to show a Latex command without it actually happening. All I see now is a black rectangle. I'll give you an example:
What do others see?
When I'm logged in I get this:
And when I'm logged out I get this:
I get the same effect on the 'LaTeX - A Crash Course' pages here and here.
As there's no mention in the LaTeX thread back then of there being black text on black background, I suspect that the problem is newish.
Hi Bob;
...pm is an abbreviation of the Latin phrase post meridian. Meridian is the Latin for noon so post meridian means after-noon...
Down here in Australia I learnt to use the Latin meridiem, not meridian, with the latter being more commonly a geographical term probably derived from the French méridien. See here: Grammarphobia: Ante meridiem or antemeridian?
12 hours after the meridian means midnight! I was staying at a hotel that said the fire alarm was to be tested at 12pm. Did they really mean midnight? I think a lot of guests would not be happy to have the alarm go off then.
So, personally, I only use noon and midnight and shun this stupid habit of saying 12pm
This is from Wikipedia's '12-hour clock' article, about halfway down the page under the heading 'Confusion at noon and midnight':
"It is not always clear what times "12:00 a.m." and "12:00 p.m." denote. From the Latin words meridies (midday), ante (before) and post (after), the term ante meridiem (a.m.) means before midday and post meridiem (p.m.) means after midday. Since "noon" (midday, meridies (m.)) is neither before nor after itself, the terms a.m. and p.m. do not apply."
phrontister (post #52) wrote:The rounding that occurs once QB64's double-precision limit is reached has enabled me to manufacture the following X3 + Y3 = Z3 'solution'...
I've explored that further, and found that manufacturing X3 + Y3 = Z3 'solutions' for ARB's QB64 program is fairly easily done...like so:
1. X1 = a 17-digit number.
2. Y1 = X1.
Note: {Y1 = X1+1}, {Y1 = X1+2} and {Y1 = X1+3} also work well, but yield successively fewer 'solutions' than {Y1 = X1}.
3. Z1 = the cube root of Z3: just select the first 17 digits of the cube root (the last digit may need rounding up if it's ≥5).
Inspired by the second image in my post #52, my theory was that for both X1 & Y1 >17 digits, there'd be 'solutions' if their lengths are equal and their first 17 digits are equal (or nearly equal). However:
1. My first trial, with X1 & Y1 both 24 digits long & the first 18 digits equal, resulted in the 'solution' as per the image below...which yielded the coveted "WOW!".
2. My next trial, with X1 & Y1 both 30 digits long, resulted in no 'solutions' (tried equal digits from first 15 to first 30, all in vain). Hmm...
Conclusion: There are many, many 'solutions', but I haven't found the 'rule' that discovers them all.
As you can see, X1 & Y1 differ by 999,999. There would be many 'solutions' in that X1:Y1 range.