I have decided to blog one of my math distractions, a kind of peek inside my head as I go through the steps of trying to understand something just over my intellectual horizon. The problem I have chosen to inflict upon you is a generalization of the four 4 problem introduced to me a while back. Now this is a live production, you will be getting the info pretty much as I come up with it, so it will probably take several posts and may not have a conclusion - many times I either find a more interesting problem to work on or I the problem becomes too difficult for me to finish.
OK, here is the general idea: if given a number k what is the least number of k's needed to make any Natural number n, and what is the average number of k's used for all the numbers up to n? In other words if given any number, say 7, how many 7's does it take to make each of the numbers from 1 to whatever. Now in order to make the problem workable within my amateur time frame, I also decided to restrict the operations, allowing only arithmetic operators i.e. addition, subtraction, multiplication, division, exponents, and roots (higher level operators like tetration are also allowed however they probably won't be needed). To be clear factorials are not used, neither is concatenation (44 is not used as two fours) or decimals (it's a form of concatenation), so repeating decimals is right out. Just digits and simple math.
Where to start, well, the Zen Buddhist in me says - at the beginning. So I’ll list all the ways to make each of the numbers from 1 to what ever using 1's:
k=1
n m t a
1= 1 1 1 1
2= 1+1 2 3 1.5
3= 1+1+1 3 6 2
4= 1+1+1+1 4 10 2.5
: : : :
n= 1+1+1... n sum(n) (n+1)/2
Key: k is the number to make the n's out of, m is the number of k's used to make that number, t is the total number of k's used up to that number, and a is the average number of k's used. (editor's note: the 's is probably not grammatically correct but the spacing makes it easier for me to read and should be read as the plural not the possessive).
So for k=1 the minimum number of ones needed to make any number n is n and the average number of 1's needed to make all the numbers from 1 to n is (n+1)/2. Simple right? :) Ah, but 1 is often a trivial case, lets go on to 2. I know, I know, I want to jump to the bigger numbers like 4 too, but lets build a case by pseudo-induction.
k=2
n m t a l
1= 2/2 2 2 2 2
2= 2 1 3 1.5 2
3= 2 + (2/2) 3 6 2 3
4= 2x2 2 8 2 3
5= (2x2) + (2/2) 4 12 2.4 4
6= 2+2+2 3 15 2.5 4
7= (2x2) + (2/2) + 2 5 20 2.857~ 5
8= 2x2x2 3 23 2.875 5
9= (2x2x2) + (2/2) 5 28 3.111~ 5
10= (2x2x2) + 2 4 32 3.2 5
11= (2x2x2) + (2/2) + 2 6 38 3.455~ 6
12= (2+2+2) x 2 4 42 3.5 6
13= (2^(2+2)) - (2/2) - 2 6 48 3.692~ 6
14= (2^(2 + 2)) - 2 4 52 3.714~ 6
15= (2^(2+2)) - (2/2) 5 57 3.8 6
16= 2^(2+2) 3 60 3.75 6
17= 2^(2+2) + (2/2) 5 65 3.823~ 6
18= 2^(2+2) + 2 4 69 3.833~ 6
19= 2^(2+2) + (2/2) + 2 6 75 3.947~ 6
20= 2^(2+2) + (2+2) 5 80 4 6
Key: "~" denotes that the number has been approximated by rounding. l is the first appearance of a higher m, this shows how many k's are needed to make all the numbers up to that n, or put simply if I wanted to make all the numbers between 1 and 20 using five 2's I could not because the first number that has to use a minimum of 6 is 11. The sixes would continue until the first seven is encountered.
So how do I know that m is the minimum number of k’s for n? Here it was done by construction. I know that the only number with one 2 is -- 2. So I used that number twice with each of the operators and got all of the numbers with two 2's -- 2+2, 2-2, 2x2, 2/2, etc. which, disregarding duplicate and non-natural answers are 0, 1, and 4. Next we want to find all the numbers which use three 2s, so we use the numbers which use one 2 (2); the numbers which use two 2's (0,1,4); and use each of the operators. Again disregarding non-applicable answers I get: 3, 6, 8, 16, 256. So, next is, you guessed it, numbers with four 2's are made up by using each of the operators on numbers with one 2 and three 2's and on numbers with two 2's and other numbers with two 2's. Now I only see hints of patterns peeking out from behind this forest of twos so lets do k=3 and see what we can find.
k=3
n m t a l
1= 3/3 2 2 2 2
2= 3 - (3/3) 3 5 2.5 3
3= 3 1 6 2 3
4= 3 + (3/3) 3 9 2.25 3
5= (3+3) - (3/3) 4 13 2.6 4
6= 3+3 2 15 2.5 4
7= (3+3) + (3/3) 4 19 2.714~ 4
8= (3x3) - (3/3) 4 23 2.875 4
9= 3x3 2 25 2.778~ 4
10= (3x3) + (3/3) 4 29 2.9 4
11= (3x3) + 3 - (3/3) 5 34 3.091~ 5
12= (3x3) + 3 3 37 3.083~ 5
13= (3x3) + 3 + (3/3) 5 42 3.231~ 5
14= 3x(3+3) - 3+(3/3) 6 48 3.429~ 6
15= (3x3) + (3+3) 4 52 3.467~ 6
16= (3x3)+(3+3)+(3/3) 6 58 3.625 6
17= (3^3) - (3x3) + (3/3) 6 64 3.765~ 6
18= 3 x (3+3) 3 67 3.722~ 6
19= (3x3)+ (3x3)+(3/3) 6 73 3.842~ 6
20= 3x(3+3) + 3 - (3/3) 6 79 3.95 6
21= 3x(3+3) + 3 4 83 3.952~ 6
Observation: construction takes too long (unless tom wants to write me a brute force computer program :) )
So what is the 'formula' for finding the minimum number, m, of k’s for a given n? That I will have to leave for next time, as I must go. Please post any observations on patterns or suggestions as to a direction I might take.
Recent Comments