mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)
-   -   Number of divisors of n? (https://www.mersenneforum.org/showthread.php?t=5452)

Citrix 2006-02-06 21:41

Number of divisors of n?
 
Given a number n and it's factorization how do you calculate the number of divisors. I know if all factors are distinct, ie. number n is square free then number of divisors =2^#of factors.

Please provide the formula.

Thanks!

grandpascorpion 2006-02-06 22:18

Try figuring it out. It's easy.

marc 2006-02-07 00:20

For a power of a prime f(p**n) = n+1 and f is multiplicative. Easy peasy.

ewmayer 2006-02-07 00:36

[QUOTE=Citrix]Given a number n and it's factorization how do you calculate the number of divisors. I know if all factors are distinct, ie. number n is square free then number of divisors =2^#of factors.[/QUOTE]Uh...6 has prime divisors 2 and 3, and thus has proper divisors 2,3,6, which number 3, not 2[sup]2[/sup].

Citrix 2006-02-07 00:39

You forgot 1

philmoore 2006-02-07 01:16

It even took Mersenne awhile to figure this one out, so don't feel bad if you don't get it right away. Try the example of 48, and you'll probably see the pattern.

Citrix 2006-02-07 03:10

Thanks, I figured it out. It wasn't hard, just me being lazy.

Q2)This is kind of hard for me. How many numbers under 2^n are composed of factors that are under n?

What is the formula?

Thanks!

ewmayer 2006-02-07 20:45

Ah, I was confusing my [url=http://mathworld.wolfram.com/ProperFactor.html]proper factors[/url] and [url=http://mathworld.wolfram.com/ProperDivisor.html]proper divisors[/url]. And it seems this discussion is not about either, since "proper divisors" includes 1 but excludes n, e.g. 6 has 3 of those (but 1,2,3 rather than 2,3,6 as I stated initially.) What do I know, I usually only give a rat's a** about the *prime* divisors.

Citrix 2006-02-08 02:11

Thanks for responding, but I never said the divisors had to be proper.:smile:

philmoore 2006-02-08 04:05

Your second question is hard. I think you are asking how many numbers less than 2^n are "n smooth", is that correct? The Dickson function gives the probability that a number is smooth, so you are looking for an integral of it, but the Dickson function is already computed by numerical integration, so I doubt that there is any convenient closed form for the expression you want.

mfgoode 2006-02-08 04:09

Number of divisors of n?
 
[QUOTE=Citrix]Given a number n and it's factorization how do you calculate the number of divisors. I know if all factors are distinct, ie. number n is square free then number of divisors =2^#of factors.

Please provide the formula.

Thanks![/QUOTE]
:smile: Allow me to quote Garo's post no. 228 in 'Special Whole numbers' as a reply to my query on the same subject.

The number of factors of any number that has a prime factor representation of:

p_1^n_1 * p_2^n_2......p_r^n_r

where p_1,p_2,....p_r are it's prime factors and n_1,n_2,...n_r are their respective exponents, is:

(n_1+1)*(n_2+1)*.....(n_r+1).

This includes 1 and the number itself, so you can remove those two if you do not wish to count them. So for
2^6×3^5×5^3×7^2×11×13×17×19×23×29×31×37×41×43×47
the total number of factors would be:

7*6*4*3*2^11 = 1,032,192

It is easy to see why the number of factors follows the relation given above. Note that each factor can have p_i in it from 0 to n_i times for a total of (n_i +1). See C&P ch. 1 for more details.

--------------------------------------------------------------------------------
Last edited by garo : 28 Dec 05 at 12:01 AM. Reason: typos

Mally :coffee:


All times are UTC. The time now is 16:44.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.