Thread: Happy Eater Primes View Single Post
 2020-11-26, 21:45 #1 ONeil   Dec 2017 24×3×5 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,'<--