Alice’s weekend homework was on number bases. It was all pretty simple stuff and didn’t take any hard thinking at all. So Alice started to play around with the numbers to see if anything interesting happened.

The number 8 in base 10 could be written as 1000 base 2, 22 base 3, 20 base 4, 13 base 5, and so on until it gets stuck at 8 in base 9, 10, 11, 12 and any other base. Was there a base 1? Alice thought about this as the school book was silent on this matter. If there was a base 1 then 8 would be written as 11111111. Imagine writing 88 in base 1! Not only would it be really long and boring to do but it would also be long and boring to check that it really did have 88 digits, and not 87 or 89. It dawned on Alice why we use base 10 for counting. However, it didn’t make sense why clocks go up to 12 rather than 10, but she was happy to have had one bright idea this morning and didn’t want to spoil that smiley feeling.

Alice went back to doodling numbers and found something else: 13 base 4 was equal to 7 (in base 10), 22 base 4 = 10, 31 base 4 = 13, 103 base 4 = 19, 112 base 4 = 22. Patterns. Alice loved patterns, but this one seemed to have gaps in it. This needed a plan and lots of calculations. The idea that Alice was trying to formulate in her mind was the following.

Let’s take a whole number B and express it as A base N in such a way that N is the sum of the digits of A. If A base N = B base 10, then B is a ‘basiq’ number. If B cannot be expressed in this way then it is a non-basiq number. How many non-basiq numbers are there between 1 and 100 inclusive?

We have just seen that 13 base 4 = 7 and that 1+3=4 so that 7 is a basiq number. However, there is no way to write 8 in the same form so 8 is non-basiq. Alice quickly discovered a simple rule that cut down her calculations... and then another! She had completed her puzzle too quickly! There was, however, a lingering question: was there a highest non-basiq number or did they carry on getting ever-bigger? This sounded like a challenge for Professor Pailyn.

Can you help Alice before she visits the Professor?

But firstly, can you solve Alice’s puzzle, to find all non-basiq numbers between 1 and 100 inclusive?