mersenneforum.org Happy Eater Primes
 Register FAQ Search Today's Posts Mark Forums Read

 2020-11-26, 21:45 #1 ONeil   Dec 2017 3608 Posts Happy Eater Primes This code just gobbles up the Primes. So serve yourself up a tasty prime. Beware a learning curve so focus on the 0 EATER or 0 ZONE first! When you see a ZERO next to EATER or ZONE then is a probable prime go through all the rules before checking its primality. After awhile you will get the hang of the left column and subtle rules. If anyone can improve the code post it here thanks. Code: `import time print('''If its easier to understand, start by looking at the ZONE or EATER, then read all the rules! This code should weed out composite numbers and help indicate Prime numbers or Twin Primes. The code works for a 0 ZONE or 0 EATER!''') print('**********************************************************************************') while True: p = int(input('Is this number Prime?: ')) print('__________________________________________________') if p % 2 and p % 5 != 0: n = (((p - 1) % 9 + 1 if p else 0)-9) s = (n*(-1)) u = (((p - 1+s) % 9 + 1 if p else 0)) m = ((((p - 1+s) % 9 + 1 if p else 0))+(((p - 1) % 9 + 1 if p else 0)-9)) j = (p+(((p - 1) % 9 + 1 if p else 0)-9)-1) z = (((j - 1) % 9 + 1 if j else 0)) start_time = time.time() print('___________________',p%7,p%3,'If Zero its a PSUEDO NUMBER, SOUL EXCEPTION 7 & 3') print('If for a 0 EATER the two Top numbers are odd then number is PSUEDO and stop here') print(m,'|TOP|Start of Column to left') print(p%11,'If a 0 then number is a Psuedo Prime|Soul exception 11') print('____________________') print('If even in ZONE and EATER than Prime') print('While only in ZONE and EATER if the only odd is a 3 in the left Column than input is _____Prime') print(((p)+(p-1)+(p-2))%9,'|ZONE|Either a Prime or PSUEDO for a >Z E R O<') print(((p)+(p+1)+(p+2))%9,'|EATER|Prime for >Z E R O< or PSUEDO NUMBERS') print(((((p)+ (p-2)) %19)+((((p)+ (p+2)) %19)))%18,'| If ZONE and EATER ARE ONLY ODD THAN NUMBER IS PSUEDO PERIOD!') print('_______',((((((p)+ (p-2)) %19)+((((p)+ (p+2)) %19)))%18)+(((p)+(p-1)+(p-2))%9))%5,'If a Zero input Not Prime, but if this number is TWO with the zero on left then prime',p%7,'<--
 2020-11-26, 22:19 #2 paulunderwood     Sep 2002 Database er0rr 3×11×107 Posts Moderator Note: Please confine your posts to your blogorrhea section

 Similar Threads Thread Thread Starter Forum Replies Last Post LaurV LaurV 3 2020-09-21 17:06 10metreh Lounge 5 2012-01-04 11:29 Uncwilly Lounge 11 2009-08-08 18:30 petrw1 PrimeNet 1 2009-05-07 16:31 TTn 15k Search 1 2006-03-22 23:55

All times are UTC. The time now is 20:43.

Mon Jan 18 20:43:04 UTC 2021 up 46 days, 16:54, 0 users, load averages: 3.21, 2.75, 2.25