A subset here, a subset there ....

Let S ( n ) S(n) be the number of subsets { a , b } \{a,b\} of the set { 1 , 2 , 3 , . . . . , 1000 } \{1,2,3, .... , 1000\} such that n a b n | ab .

Find S ( 13 ) 2 S ( 31 ) S(13) - 2*S(31) .

Notes:

  • The elements a a and b b must be distinct.

  • By " n a b n | ab " I mean that n n divides a b ab .


The answer is 10130.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

If n = p n = p a prime then if p a b p | ab then either p a p | a or p b p | b , (or both).

Say p p divides only one of the elements. Without loss of generality let this element be a a . There are then x = 1000 p x = \lfloor \dfrac{1000}{p} \rfloor numbers to choose from for a a and 1000 x 1000 - x numbers to choose from for b b . This gives us x ( 1000 x ) x(1000 - x) subsets.

If p p divides both a a and b b then we have ( x 2 ) \dbinom{x}{2} subsets to add to the total.

Thus for n = p n = p prime, we have S ( p ) = x ( 1000 x ) + ( x 2 ) S(p) = x(1000 - x) + \dbinom{x}{2} , where x = 1000 p x = \lfloor \dfrac{1000}{p} \rfloor .

For p = 13 p = 13 we have x = 76 x = 76 and S ( 13 ) = 76 924 + ( 76 2 ) = 73074 S(13) = 76*924 + \dbinom{76}{2} = 73074 .

For p = 31 p = 31 we have x = 32 x = 32 and S ( 31 ) = 32 968 + ( 32 2 ) = 31472 S(31) = 32*968 + \dbinom{32}{2} = 31472 .

Thus S ( 13 ) 2 S ( 31 ) = 73074 2 31472 = 10130 S(13) - 2*S(31) = 73074 - 2*31472 = \boxed{10130} .

how you got this x=1000/p ??

Please explain

Ashu Dablo - 6 years, 8 months ago

Log in to reply

x = 1000 p x = \lfloor \frac{1000}{p} \rfloor indicates the number of (positive) multiples of p p less than or equal to 1000 1000 . So if p = 13 p = 13 we have x = 1000 13 = 76 x = \lfloor \frac{1000}{13} \rfloor = 76 since 76 13 = 988 76 * 13 = 988 is the greatest multiple of 13 13 that is 1000 \le 1000 .

Note that the . . . \lfloor ... \rfloor symbols indicate the floor function, which returns the greatest integer less than or equal to the enclosed value.

Brian Charlesworth - 6 years, 8 months ago

Log in to reply

got it, thanks :)

Ashu Dablo - 6 years, 8 months ago

@brian charlesworth

Ashu Dablo - 6 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...