[–] 5 points6 points  (1 child)

sorry, this has been archived and can no longer be voted on

The condition "# of divisors is a power of two" is equivalent to the exponents of the prime factorization all being one less than a power of two. For example, any number which is a product of distinct primes has this property.

Do the statistics for triangle numbers seem different from the statistics for non-triangle numbers?

[–][S] 1 point2 points * (0 children)

sorry, this has been archived and can no longer be voted on

Actually, no, running the function on the first 10,000 natural numbers gave many that are powers of two.

[–] 1 point2 points  (1 child)

sorry, this has been archived and can no longer be voted on

Argh. I know exacly why this is but I can't put words to it in a concise way.

Thing is, if the prime factorisation of the triangle number doesn't contain the same prime more than once, then the number of factors you can construct from those primes are 2n where n is the number of prime factors.

You can verify that for yourself with for example T(11) = 66, which has prime factors 2, 3 and 11. They can be arranged into divisors

2
3
11
2*3
2*11
3*11
2*3*11


That's 2n - 1, but then you add 1 as a divisor and the total number of divisors are 2n , iff the prime factorisation contains each prime exactly zero or one times.

If the prime factorisation contains the same prime more than once, you'll have fewer factors. Consider for example T(9) = 45. It has prime factors 3, 3, 5. You can arrange those 2n - 1 ways too, like so:

3
3
5
3*3
3*5
3*5
3*3*5


But as you notice, two of those factors are just duplicates of earlier ones, so they don't count, and therefore you end up with a number of divisors which are less than 2n .

To conclude, any number has at most 2n divisors, where n is the number of prime factors. The numbers which have 2n divisors are the ones where each prime number doesn't occur more than once in its prime factorisation. Where they do, the number of factors are less.

Now the question might have become "How come a majority of triangle numbers have prime factorisations where each prime doesn't occur more than once?"

I leave that question to someone else.

[–][S] 1 point2 points  (0 children)

sorry, this has been archived and can no longer be voted on

Ok, I think I've got it all figured out. In regards to your last question, I believe its not just a property of triangle numbers, but of all numbers. I've ran the test on natural numbers from 1 to 10,000 and many of them have a number of divisors which is a power of two.

Intuitively, the probability that a number is divisible by a prime p is 1/p, because on in every consecutive p numbers has p as a factor. The probability that a number is divisible by p2 (or p, twice), is 1/p2, the probability that a number is divisible by p3 is 1/p3. As you can see, the probability is highest that a number has p as a factor rather than p2, p3, etc. as a factor.

[–] 0 points1 point  (3 children)

sorry, this has been archived and can no longer be voted on

If you write n = p_1e_1 * p_2e_2 * ... * p_ne_n then the number of divisors of n is (e_1 + 1)(e_2 + 1)(e_3 + 1)...(e_n +1) because for each p_i, you can either have 0 of it, 1 of it, 2 of it, ..., or e_i of it, which is e_i+1 choices. This is a power of 2 iff each e_i = 1.

Now gcd(n,n+1) = 1, so n and n+1 have no primes in common. Therefore, n(n+1)/2 has no e_i > 1 if both n and n+1 are squarefree (are not the multiple of a square other than 1) or if one is squarefree and the other is only a multiple of 4 and no other squares (because then the /2 will get rid of that).

[–] 0 points1 point  (1 child)

sorry, this has been archived and can no longer be voted on

8 has 22 divisors, but it has e_1=3.

[–] 1 point2 points  (0 children)

sorry, this has been archived and can no longer be voted on

Good catch, each e_i has to be 1 less than a power of 2, except the exponent for 2.

Apparently ~6/pi2 ~ .6 of the numbers < n are square free as n increases. Assuming the fudge factors of needing 2 consecutive square free numbers and the fact that the numbers don't need to actually be square free, but the actual criterion are somewhat negligible, that's 5746/10000 is pretty close.

[–][S] 0 points1 point  (0 children)

sorry, this has been archived and can no longer be voted on

The first part I agree with, but for the n(n+1)/2, squares aren't the only thing that can affect whether the number of divisors multiplies to 2n, fifth, sixth, and tenth, etc. powers can all do that. However, given how large a number to the tenth power is, there is little likelihood a number will be divisible by it.

Thanks for the great insight into the phenomenon!
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}