Skip to main content

Posts

Showing posts from October, 2022

Friday Quiz maths problem 14 Oct 22

I did spend a little time trying to reason it out and arrive at an answer through logic but soon gave up and resorted to my usual method of 'try all the numbers and count how many fit'. Using my trusty Minstrel Forth (Jupiter Ace clone) I have written a program to cycle through all 10-digit numbers that use 1,2 and 3  and test / count  the number that qualify (adjacent numbers differ by 1) It's taking a while. As I write this it seems to be running but it'll take a little while longer before I have an answer. Once it's finished and I know it's working properly I'll write my program below for Forth fans. [update] The answer is 64 and this week we do have some working.   My program did eventually come up with the right answer after a bit of debugging and you can see the pattern referred to. The listing is below, please feel free to type it in, or paste it if you have one of my USB keyboard / serial adaptors .   I love using recursion. Here I've re-used som