⚠️ Warning: This is a draft ⚠️

This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.

If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.

==The Combinatronics== A loop factorizing integers to find the number of divisors is a lame way to implement this task! If I use only 1 prime then it should be 2 and S(n) = 2**(n-1). I shall conject that if n is prime then S(n) is 2**(n-1) no matter how many primes I use, we shall see why later. Let me consider the case where I use 2 primes. In general they form integers of the form (P1A1)*(P2A2), for a minimal P1 should be 2 and P2 should be 3 with A1 greater than or equal A2. 235=30 so any values I can find less than or equal 30 with 2 primes is minimal. The number of factors of such an integer will be 1+A1+A2+A1*A2. Anything larger than 2**5 is greater than 30 so I construct a table:


A1 A2 factors value
 1  1    4      6
 2  1    6     12
 2  2    9     36
 3  1    8     24
 3  2   12     72
 3  3   16    216
 4  1   10     48
 4  2   15    144
 4  3   20    432
 4  4   25   1296

By examination I can now produce S(1)..S(8). S(9) may be 36, S(10) may be 48 and(S12) may be 72, but being greater than 30 there may be a smaller value with 3 primes. For 3 primes the number of factors is 1+A1+A2+A3+A1A2+A1A3+A2A3+A1A2A3 and are good upto 2357 (210). 235 has 8 factors but can not be better than 24. 2235=60 and has 12 factors, so it replaces the existing guess (72). This also validates my current guess for 9 and 10. So I can now generate S(1)..S(13). Realizing that the formula for the number of factors for n primes is (1+A1)*(1+A2)...(1+An) I can see why there is no value better than S(n)=2(n-1) for prime n. I can also calculate S(14): 14=(1+6)(1+1)->2**63->192.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:37, 13 April 2019 (UTC)