For how many ordered pairs (p,q) of positive integers with q < p ≤ 2015 is each of p/q, (p+1)/(q+1) and (p+2)/(q+2) an integer?
We're given p=0 mod q, (p+1)=0 mod(q+1) and (p+2)=0 mod(q+2).
The last two congruences can be rewritten as p=q mod(q+1) and p=q mod(q+2) by adding the modulus value.
So we have (p-q) divisible by q*(q+1)*(q+2) and p will equal a multiple of that number plus q. All that's left is to evaluate for appropriate q and count the multiples <= 2015.
q q*(q+1)*(q+2) multiples
1 6 335
2 24 83
3 60 33
4 120 16
5 210 9
6 336 5
7 504 3
8 720 2
9 990 2
10 1320 1
11 1716 1
For example, given q=7, p=3*504+7=1519=7*219, 1520=8*190, 1521=9*169.
Thus there are 490 pairs (p,q) satisfying the problem conditions.
|
Posted by xdog
on 2015-06-03 11:41:28 |