The second form of the sum of factors of N is a product of sum of power of primes from 0 to n that occur in its prime factorization.

Hence if sum = S is given. We try to write it as product of sums of powers of primes and match it with standard form to find the N.

Now For a particular N, S = constant.But for a particular S, N may or may not be unique or may not even exist.For this you need practice and acquaintance with1 + 2 + 4 = 7 = 2^3 - 11 + 5 + 25 = 311 + 7 = 8 while 1 + 7 + 49 = 57You need to work with them multiples times and their product combinations to be familiar with this.

example: If sum of all factors of N is 18. 18 = 3*6 = (2^0 + 2^1)(5^0 + 5^1)=> N = 2^1 * 5^1 = 10.No other factorization of 18 would give such a form so N = 10 only.

The Logic behind the formula : For perfect squares we have 2^0,2^1,...,2^10 available(similarly for other powers) and to keep a factor perfect square we can use : 2^0 or 2^2 or 2^4 .. or 2^10 which is basically 0 to 10 in steps of 2 So [10/2] + 1 = 6 = { 0,2,4,6,8,10 } Similarly for perfect cubes.

i) Number of ways in which N can we written as a sum of consecutive natural numbers is equal to (No of odd factors - 1)Logic : Let the k consecutive numbers be a, a+1, a+2,..N = Sum = k/2 * [a + a + (k - 1)]= k/2 * [ 2a + (k - 1)= k * [ a + (k - 1)/2 ]So k is a factor of N and (k - 1) must be even for N to be an integer => k must be odd => k must be an ODD factor of N But if k = 1 then we can't call it sum of "consecutive" So No of odd factors of N - 1

ii) Number of ways in which N can we written as a sum of consecutive INTEGERS = 2 * (Number of odd factors) - 1

Example: Find the number of ways 105 can be written as sum of consecutive i) Natural numbers ii) Integers.

Let’s look at the logic behind thisTake one of the odd factors ,say, 5 Now, 5 * 21 = 105So what we do is we take one number as 21 and split remaining 4 on either side of 21 as 19, 20 , [21] , 22 , 23 And these form the sum = 105 and stay consecutive

ii) Factors of N^2 less than N but not a factor of N is given as : (Factors of N^2 - 1)/2 - (Factors of N) + 1

One of the factors of N^2 is N. By extension all factors of N are factors of N^2 too.

We need those factors of N^2 that are less than N yet not a factor of NBy symmetry half of the factors of N^2 shall lie below and half above N about the vertex point N itself. So first part is that division to reach below N part. Then second part removes Factors of N from it.When in first part we divide about N and subtract factors of N we subtract N once[Factors of N includes N itself as well] which was already not counted. Hence +1 for that in the end.

Ordered sets : If for a given situation, a set of n elements satisfies the problem solution then all permutations of those n elements that satisfy the problem solution are to be counted as different i.e. a, b is treated different than b, a ; a, b, c is counted different from a, c, b or b, a, c or b, c, a or c, a, b or c, b, a If all these permutations satisfy our question statement and each element is to be considered uniquely then we take the ordered sets while when they need not be uniquely identified for our problem then we take unordered sets.

Unordered sets : If for a given situation, a set of n elements satisfies the problem solution then any permutation of that set satisfying the problem solution should be considered as the same and not counted again.a, b is same as b, a and a, b, c is same as other (3! - 1) = 5 permutations.

example: Saying product of three numbers is N. Find the number of ways is finding unordered sets while saying a * b * c = N. Find the number of ways is indicative of ordered sets. Otherwise you go by what is explicitly asked from you.