All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Modular mathematics (Posted on 2012-12-28)
Determine all pairs of positive integers(a,p) where p is a prime and

(a modp)+(a mod2p)+(a mod3p)+(a mod4p)=a+p

 No Solution Yet Submitted by Danish Ahmed Khan Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 An improved methodology (spoiler) | Comment 3 of 4 |
Well, this problem continues to interest me.  Picking up on a Charlie's idea, let a = pk + b where k and b are integers and 0 <= b < p.  We potentially need to consider all 12 cases of k mod 12 (because 12 is the LCM of 1,2,3 and 4), but we know that a < 9p (see previous post), so we only need to consider k = 0 through 8, and not worry about mod 12 at all.  Just 9 cases is an improvement over the prior methodology, and here they are:

/*************************/
k = 0  (ie, a < p)
b + b + b + b = (b) + p
b = p/3
works for p = 3, b = 1, a = 1
Solution a = 1, p = 3
/*************************/
k = 1
b + (p+b) + (p+b) + (p+b) = (p + b) + p
b = -p/3
No solution, since b is negative
/*************************/
k = 2
b + (b) + (2p+b) + (2p+b) = (2p + b) + p
b = -p/3
No solution, since b is negative
/*************************/
k = 3
b + (p+b) + (b) + (3p+b) = (3p + b) + p
b = 0
Solution a = 3p
/*************************/
k = 4
b + (b) + (p+b) + (b) = (4p + b) + p
b = p*(4/3)
No solution, since b > p
/*************************/
k = 5
b + (p+b) + (2p+b) + (p+b) = (5p + b) + p
b = p*(2/3)
works for p = 3, b = 2, a = 17
Solution  a = 17, p = 3
/*************************/
k = 6
b + (b) + (b) + (2p+b) = (6p + b) + p
b = p*(5/3)
No solution, since b > p
/*************************/
k = 7
b + (p+b) + (p+b) + (3p+b) = (7p + b) + p
b = p
No solution, since b = p
/*************************/
k = 8
b + (b) + (2p+b) + (b) = (8p + b) + p
b = p*(7/3)
No solution, since b > p

Edited on December 31, 2012, 11:28 am
 Posted by Steve Herman on 2012-12-31 10:44:20

 Search: Search body:
Forums (0)