Thread: Power???
View Single Post
Old 2011-08-29, 17:07   #1
JohnFullspeed
 
May 2011
France

7×23 Posts
Default Power???

I need to find the first multiple of a prime number > an offset

i/e
Let Offset be 223092870
Let P be 21247
I want N like
Offfset+N = 223 093 500 = 105000 * 12247
223092870 div 21247 = 10499
223093500 -223092870 = 630 = N
I code this but I have a problem when the offset change
I do
N:=P-(offset mod p) Is the problem in the pollynome ?

Thanks
JohnFullspeed is offline   Reply With Quote