# Expanding Factors [closed]

So I recently thought of something. What if you take an integer (like 17 in this case), and find the set of numbers that add together in the closest form, of length 2, but increasing each level. So you would divide 17 into 8 and 9. But then those two numbers would be divided 3 times, producing 2, 3, 3 and 3, 3, 3 respectively. You go any number of levels until the resulting numbers are 0 or 1. Then you count the number of levels. This creates a sort of magnitude of the number. In this case, that magnitude is 3, because it required 3 levels to reach 1's and 0's. Now the question is, is there any mathematical way of doing this? Any formula that could produce the magnitude of an integer?

• Probably more suited for math.se. – Zimonze Feb 16 '19 at 23:03
• Can $17$ be reduced to any two numbers e.g. $6$ and $11$? – athin Feb 17 '19 at 0:37
• Inverse factorial, rounded down – Dr Xorile Feb 17 '19 at 0:58
• Actually rounded up and minus 1 – Dr Xorile Feb 17 '19 at 1:13
• @athin It says 'that add together in the closest form'. Bit obscure, but I think it means the set of numbers on the lower level can differ by at most 1. – ZanyG Feb 17 '19 at 1:40

As Dr Xorile noted in the comments, all numbers, $$k$$, which are of magnitude $$N$$ satisfy

$$N!

Reasoning

Consider the largest number represented by a given magnitude $$N$$.

For this number, the bottom layer would consist entirely of groups of $$N+1$$ $$1$$s. The number of groups in this bottom layer is just $$N!$$ (since the $$n$$th layer has $$n$$ times more factors than the $$(n-1)$$th layer) and the sum of the numbers in the bottom layer is equal to the original number.

Hence, this largest number of magnitude $$N$$ is $$k = (N+1)N! = (N+1)!$$

Increasing this number by $$1$$ guarantees that we are forced to have at least one $$2$$ in the $$(N+1)$$th layer and so the magnitude must increase by $$1$$.

• Wow! I wasn't expecting this to actually work. Good job guys lol. – Rigidity Feb 17 '19 at 22:50

You basically follow the formula $$ceil(ceil(n/2)/3)...$$ and see how many steps are needed. If it was a factorial written as $$x!$$, the magnitude would be $$x-1$$ with only 1s left at the end, and if $$x!, it will take more steps after $$x-1$$ steps and no more than $$x$$ ones, so $$x$$ steps are necessary.

Well, I put together a little java program:

public class NumberMagnitude {

public static void main(String[] args) {
int value = 17;
int k = value;
int magnitude = 2;
while(true) {
k=(k/magnitude);
(k<=1) { break; }
magnitude++;
}
System.out.println("The magnitude of " + value + " equals " + magnitude);
}

}

I'm not sure if this is exactly what you where looking for when you asked for a formula, but I figured it couldn't hurt.
You can modify the variable named "value" to test a different number; you could also create a fancier application that asks the user for input or used GUI, but I didn't have time for that.

• Cool, this could help. – Rigidity Feb 17 '19 at 22:51