mersenneforum.org Power???
 Register FAQ Search Today's Posts Mark Forums Read

 2011-08-29, 17:07 #1 JohnFullspeed   May 2011 France 2418 Posts 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
2011-08-29, 18:53   #2
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

203008 Posts

Quote:
 Originally Posted by JohnFullspeed 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 Code: 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
1)the bold is a massive arithmetic error ( yes I've checked it, and I'm guessing it's a typo?)
2)the underline is a line I personally don't see the use for
3)the italic is a spelling error
4) really because the line I wrapped in code tags says (Offset+N)-Offset = N

5) I come to: X=Offset+(P-(Offset%P)) working no ?

 2011-08-30, 06:33 #3 JohnFullspeed   May 2011 France 7×23 Posts Typo ( yes I've checked it, and I'm guessing it's a typo?) Yes I inverse the two first digir of P 21247 is not 12247!!!! 223092870 div 21247 = 10499 P^10499 < Offset p^10500 > Offset N= P^10500- Offset or N=P-(offset mod p) N must be >0 and < Offset) I restart from 0 and I code verifying the error line by line Have you an idea how to process the Golback conjecture: all even value is the sum of two primes numbers?? John
2011-08-30, 11:29   #4
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts

Quote:
 Originally Posted by JohnFullspeed ( yes I've checked it, and I'm guessing it's a typo?) Yes I inverse the two first digir of P 21247 is not 12247!!!! 223092870 div 21247 = 10499 P^10499 < Offset p^10500 > Offset N= P^10500- Offset or N=P-(offset mod p) N must be >0 and < Offset) I restart from 0 and I code verifying the error line by line Have you an idea how to process the Golback conjecture: all even value is the sum of two primes numbers?? John

Code:
f=[];for(i=1,100,for(j=1,100,f=concat(f,if((prime(i)+prime(j))%2==0,prime(i)+prime(j)))));vecsort(f,,8)

2011-08-30, 15:55   #5
JohnFullspeed

May 2011
France

7×23 Posts
Find!

The polynome was goof the error was at the line just after.

I make N= N^2 ((an optimization) but it's good only if you begin at one:

Quote:
 Create a list of consecutive integers from 2 to n: (2, 3, 4, ..., n). Initially, let p equal 2, the first prime number. Starting from p, count up in increments of p and mark each of these numbers greater than p itself in the list. These numbers will be 2p, 3p, 4p, etc.; note that some of them may have already been marked. Find the first number greater than p in the list that is not marked; let p now equal this number (which is the next prime). If p is less than n, repeat from step 3. Otherwise, stop.

You can modify

3- Starting from p^2, count up in increments of p and mark each of these numbers greater than p itself in the list. These numbers will be 2p, 3p, 4p, etc.; note that some of them may have already been marked.

not if you make a continue search not a set of continues integers
John

2011-08-30, 16:28   #6
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts

Quote:
 Originally Posted by JohnFullspeed The polynome was goof the error was at the line just after. I make N= N^2 ((an optimization) but it's good only if you begin at one: You can modify 3- Starting from p^2, count up in increments of p and mark each of these numbers greater than p itself in the list. These numbers will be 2p, 3p, 4p, etc.; note that some of them may have already been marked. not if you make a continue search not a set of continues integers John

if you are looking to make a code I'll give you the steps but you likely don't want that.

 Similar Threads Thread Thread Starter Forum Replies Last Post petrw1 Teams 10 2019-10-15 17:36 CRGreathouse Hardware 9 2016-02-06 18:46 petrw1 Lounge 19 2013-12-13 13:00 JohnFullspeed Miscellaneous Math 45 2011-07-10 20:13 Unregistered Information & Answers 7 2008-08-30 14:36

All times are UTC. The time now is 18:56.

Fri Jan 15 18:56:32 UTC 2021 up 43 days, 15:07, 0 users, load averages: 3.31, 3.20, 2.77