Kyle Concannon
New member
- Joined
- Oct 18, 2005
- Messages
- 11
Find the smallest positive integer that is divisible by 13, and that when divided by any of the integers from 2 to 12 (inclusive) leaves a remainder of 1.
Sir Concannon, you are becoming a pain in the Royal Butt...Kyle Concannon said:Find the smallest positive integer that is divisible by 13, and that when divided by any of the integers from 2 to 12 (inclusive) leaves a remainder of 1.
For K=1 to 100000
For J=2 to 12
If mod(K,J)≠1 then next K
Next J
If mod(K,13)=0 then output K
Next K
Agree; next 2 are 443521 and 803881 :shock:pka said:Code:For K=1 to 100000 For J=2 to 12 If mod(K,J)≠1 then next K Next J If mod(K,13)=0 then output K Next K
Low and behold, the output is 83161.