another interesting math riddle - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not remotely HP Calculators (/forum-9.html) +--- Thread: another interesting math riddle (/thread-9920.html) |
another interesting math riddle - Don Shepherd - 01-13-2018 01:37 AM 145 = 1! + 4! + 5! find three other numbers like that. RE: another interesting math riddle - Gerson W. Barbosa - 01-13-2018 02:04 AM 1 = 1! 2 = 2! Well, that’s 2/3 of the answers. In an examination that would grant me a C, wouldn’t it? :-) RE: another interesting math riddle - Joe Horn - 01-13-2018 06:02 AM UBASIC: list 10 repeat:inc X0:X=X0:clr T 20 while X>0:X\=10:T+=!(res):wend 30 until T=X0:print T:goto 10 OK run 1 2 145 40585 RE: another interesting math riddle - Don Shepherd - 01-13-2018 06:14 AM Joe, you got it. I got this from a book, "The Penguin Dictionary of Curious and Interesting Numbers." At first I thought 40585 was wrong until I remembered that 0!=1 and not 0, another math oddity. RE: another interesting math riddle - Didier Lachieze - 01-13-2018 10:03 AM To find a limit to the numbers that could meet the criteria, we can compare the number of digits of a number to the number of digits of the maximum sum of its digits factorials. On the Prime in the sequence app, entering U1(N)= CEILING(LOG(9!*N))-N and going to the NUM view tells us that any number with more 7 digits cannot meet the criteria as it is superior to the maximum sum of its digits factorials (9!*8 has only 7 digits and is lower than any 8-digit number) and that for 7 digit numbers only the ones below 9!*7 (2540160) are candidates. So the following program returns all possible solutions : Code: EXPORT TST() On my Prime rev C with the Beta 3 firmware it returns {1,2,145,40585} after 16'21". There may be smarter and faster ways to check for all possible solutions. RE: another interesting math riddle - SlideRule - 01-13-2018 12:47 PM (01-13-2018 06:14 AM)Don Shepherd Wrote: … from … "The Penguin Dictionary of Curious and Interesting Numbers." … page 140 ? BEST! SlideRule RE: another interesting math riddle - Don Shepherd - 01-13-2018 03:34 PM (01-13-2018 12:47 PM)SlideRule Wrote:(01-13-2018 06:14 AM)Don Shepherd Wrote: … from … "The Penguin Dictionary of Curious and Interesting Numbers." … yes, that's where I saw it. RE: another interesting math riddle - SlideRule - 01-13-2018 05:28 PM from the front cover insert of the Penguin Dictionary of Curious & Interesting Geometry… David Wells was born in 1940. He had the rare distinction of being a Cambridge scholar in mathematics and failing his degree. He subsequently trained as a teacher and, after working on computers and teaching machines, taught mathematics and science in a primary school and mathematics in secondary schools. He continues to be involved with education through writing and working with teachers. While at university he became British under-21 chess champion, and in the middle seventies was a game inventor, devising 'Guerilla' and 'Checkpoint Danger', a puzzle composer, and the puzzle editor of Games and Puzzles magazine. From 1981 to 1983 he published The Problem Solver, a magazine of mathematical problems for secondary pupils. He has published several books of problems and popular mathematics, including Can You Solve These? and Hidden Connections, Double Meanings, and also publishes the journal Studies of Meaning, Language and Change. He has written The Penguin Dictionary of Curious and Interesting Numbers and recently published a book comparing the psychology of the Russians with that of the West. sic: bold my emphasis [attachment=5559] [attachment=5560] BEST! SlideRule RE: another interesting math riddle - olr - 01-13-2018 09:08 PM (01-13-2018 10:03 AM)Didier Lachieze Wrote: On my Prime rev C with the Beta 3 firmware it returns {1,2,145,40585} after 16'21". Another approach is to go through all sorted lists containing up to 7 digits, calculate the "factorial sum" of the digits and compare the digits of the sum with those in the list. There are \( \sum_{j=1}^7 \binom{9+j}{j} = 19447 \) sorted lists with up to 7 digits. Hence only 19447 possibilities need to be checked (and not 2540160). If we additionally take into account that at least three (of seven) digits need to be 9s in order to get a 7-digit factorial sum ( \( 5\cdot 8!+2\cdot 9! = 927360 \) ), the number of sorted lists with seven digits decreases from 11440 down to 715. Therfore only a total of 8722 possibilities need to be checked. The following program returns the result in 9 seconds on my Prime rev A (in 19 seconds if the 7-digit optimization is removed). Code:
RE: another interesting math riddle - Didier Lachieze - 01-13-2018 10:29 PM (01-13-2018 09:08 PM)olr Wrote: Another approach is to go through all sorted lists containing up to 7 digits, calculate the "factorial sum" of the digits and compare the digits of the sum with those in the list. Great solution and optimization ! RE: another interesting math riddle - Joe Horn - 01-14-2018 07:10 AM (01-13-2018 10:03 AM)Didier Lachieze Wrote: ... any number with more 7 digits cannot meet the criteria as it is superior to the maximum sum of its digits factorials (9!*8 has only 7 digits and is lower than any 8-digit number) and that for 7 digit numbers only the ones below 9!*7 (2540160) are candidates. That's true in base 10, but if we extend the riddle to larger bases, it allows the factorials to be larger. For example, both 1441 and 1442 are solutions in base 15: #1441d = #661(15) = 6! + 6! + 1! #1442d = #662(15) = 6! + 6! + 2! Unfortunately there don't seem to be ANY solutions which include a digit > 9, regardless of base. Strange. RE: another interesting math riddle - Gamo - 01-14-2018 10:22 AM Here another interesting math riddle. 12345 MOD 67890 = 12345 98765 MOD 43210 = 12345 Gamo RE: another interesting math riddle - grsbanks - 01-14-2018 10:44 AM (01-14-2018 10:22 AM)Gamo Wrote: Here another interesting math riddle. Err... Nothing surprising about that one. X MOD Y = X for all cases where X < Y RE: another interesting math riddle - Didier Lachieze - 01-17-2018 11:59 PM (01-13-2018 09:08 PM)olr Wrote: The following program returns the result in 9 seconds on my Prime rev A (in 19 seconds if the 7-digit optimization is removed). I've made a few changes to your program and now it returns the result in less than 7 seconds. Code: EXPORT TST() |