 mersenneforum.org is this a demonstrable formula?: (Extension of the independent variable)
 Register FAQ Search Today's Posts Mark Forums Read  2019-01-18, 09:20 #1 Godzilla   May 2016 101000102 Posts is this a demonstrable formula?: (Extension of the independent variable) Good morning, is this a demonstrable formula?: (Extension of the independent variable) this formula has found prime numbers of different value A=((n*n)*99)/2 B=sqrt(A) C=sqrt(A)-1 In The Code .Py "B=Func" "C=Func-1" "N= n+1" For n = 1 to 10000 N=1229 prime numbers Func=997 prime numbers Func-1=982 prime numbers TOTAL PRIME NUMBERS OF DIFFERENT VALUE = 3208-N=1979 For n = 1 to 100000 N=9592 prime numbers Func=8052 prime numbers Func-1=8131prime numbers TOTAL PRIME NUMBERS OF DIFFERENT VALUE = 25775-N=16183 etc... Code: aa=1 ii=1 i2=0 GG=0 FF=0 VV =0 e = 0 AA=0 c = 1 a =3 bb=0 dd=0 I=1 II=1 III=1 i=1 i1=0 b=0 p=1 equTwo=0 equTwoo=0 equTwooo=0 mod=0 equ=0 moda=0 modaa=0 print('Helloword \n\n'); bb=input('Inserire numero: ') while p<=bb: equTwo= ((p*p)*99)//2 equTwoo=((equTwo**(1/2.0))//1) equTwooo=equTwoo-1 print(' N= ---->' , p) print(' FUNC= ---->' , equTwoo) print(' Func-1=---->', equTwooo) while I<=p: I=I*1 I=I+1 if p==I : print(' P is prime -----', p) AA=AA+1 break if p%I==0 : break while II<=equTwoo: II=II*1 II=II+1 if equTwoo==II : print(' Func is prime -----', equTwoo) modaa=modaa+1 break if equTwoo%II==0 : break while III<=equTwooo: III=III*1 III=III+1 if equTwooo==III : print(' FUNC-1 is prime -----', equTwooo) moda=moda+1 break if equTwooo%III==0 : break p=p+1 aa=aa+1 I=1 II=1 III=1 print('\n\n\nTOTALE NUMERI P TROVATI : ' , AA) print('\n\n\nTOTALE NUMERI Func TROVATI : ',modaa) print('\n\n\nTOTALE NUMERI FUNC-1 TROVATI : ',moda) Last fiddled with by Godzilla on 2019-01-18 at 09:43   2019-01-18, 15:46   #2
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

961510 Posts Quote:
 Originally Posted by Godzilla Good morning, is this a demonstrable formula? A=((n*n)*99)/2 B=sqrt(A) C=sqrt(A)-1
Yes, this is demonstrable formula.

And so is this --
A=((n*n)*98)/2
B=sqrt(A)
Can you take a wild guess what B equals to?

We are trying to understand how much do you know (if anything at all)?    2019-01-18, 16:20   #3
Godzilla

May 2016

2·34 Posts Quote:
 Originally Posted by Batalov Yes, this is demonstrable formula. And so is this -- A=((n*n)*98)/2 B=sqrt(A) Can you take a wild guess what B equals to? We are trying to understand how much do you know (if anything at all)? With number 98 B= n*7 ?

--EDIT--

n=88

>>> ((88*88)*99)//2
383328
>>> ((383328**(1/2.0))//1)
619.0
>>>
619 is prime

and..I do not understand ...

Last fiddled with by Godzilla on 2019-01-18 at 16:43   2019-01-18, 18:24   #4
CRGreathouse

Aug 2006

3·1,993 Posts Quote:
 Originally Posted by Batalov Yes, this is demonstrable formula. And so is this -- A=((n*n)*98)/2 B=sqrt(A) Can you take a wild guess what B equals to? We are trying to understand how much do you know (if anything at all)? Quote:
 Originally Posted by Godzilla With number 98 B= n*7 ? --EDIT-- n=88 >>> ((88*88)*99)//2 383328 >>> ((383328**(1/2.0))//1) 619.0 >>> 619 is prime and..I do not understand ...
99 isn't 98.   2019-01-18, 18:46   #5
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

2×23×137 Posts Quote:
 Originally Posted by Godzilla Code: aa=1 ii=1 i2=0 GG=0 FF=0 VV =0 e = 0 AA=0 c = 1 a =3 bb=0 dd=0 I=1 II=1 III=1 i=1 i1=0 b=0 p=1 equTwo=0 equTwoo=0 equTwooo=0 mod=0 equ=0 moda=0 modaa=0 print('Helloword \n\n'); bb=input('Inserire numero: ') while p<=bb: equTwo= ((p*p)*99)//2 equTwoo=((equTwo**(1/2.0))//1) equTwooo=equTwoo-1 print(' N= ---->' , p) print(' FUNC= ---->' , equTwoo) print(' Func-1=---->', equTwooo) while I<=p: I=I*1 I=I+1 if p==I : print(' P is prime -----', p) AA=AA+1 break if p%I==0 : break while II<=equTwoo: II=II*1 II=II+1 if equTwoo==II : print(' Func is prime -----', equTwoo) modaa=modaa+1 break if equTwoo%II==0 : break while III<=equTwooo: III=III*1 III=III+1 if equTwooo==III : print(' FUNC-1 is prime -----', equTwooo) moda=moda+1 break if equTwooo%III==0 : break p=p+1 aa=aa+1 I=1 II=1 III=1 print('\n\n\nTOTALE NUMERI P TROVATI : ' , AA) print('\n\n\nTOTALE NUMERI Func TROVATI : ',modaa) print('\n\n\nTOTALE NUMERI FUNC-1 TROVATI : ',moda)
This code is totally awesome Such beautiful variable naming Such consistent spacing and alignment Such excellent and useful comments Clearly so much effort expended to make it concise and easy to understand The work of a code god  /sarc Couldn't you at least try to make it readable. Or even tell us what interpreter/language it is?   2019-01-18, 19:21 #6 Godzilla   May 2016 2×34 Posts @GRGreathouse could it be a new alghorithm? @retina language is Python language, copy the code to a text file and save it with filename.py, open python and run it.   2019-01-18, 19:22   #7
Batalov

"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

3×5×641 Posts Quote:
 Originally Posted by Godzilla With number 98 B= n*7 ? and..I do not understand ...
Ok, so you do understand some things. That is: squaring something and then taking a sqrt is a waste of time. But you prefer to waste time (yours and others').

What is so difficult, then, in taking sqrt(99/2) ? It is a constant, if you take it with enough digits of precision you will be set for doing simply:
B = floor(n * 7.03562363973514433184)
C = B - 1

Your function is a line through numbers. Granted, its slope is ugly, but so what.
What makes you think that it will be better than most other functions to "generate primes"?

For comparsion:
B = 2310*n+1
C = 2310*n-1

will generate more primes than "A=sqrt(((n*n)*99)/2)".
How do you arrive at your "wild and never before seen" "functions"?
Do you just randomly press some buttons?   2019-01-18, 19:34   #8
Godzilla

May 2016

2×34 Posts Quote:
 Originally Posted by Batalov Ok, so you do understand some things. That is: squaring something and then taking a sqrt is a waste of time. But you prefer to waste time (yours and others'). What is so difficult, then, in taking sqrt(99/2) ? It is a constant, if you take it with enough digits of precision you will be set for doing simply: B = floor(n * 7.03562363973514433184) C = B - 1 Your function is a line through numbers. Granted, its slope is ugly, but so what. What makes you think that it will be better than most other functions to "generate primes"? For comparsion: B = 2310*n+1 C = 2310*n-1 will generate more primes than "A=sqrt(((n*n)*99)/2)". How do you arrive at your "wild and never before seen" "functions"? Do you just randomly press some buttons?
I try with small tests with the electronic calculator and pen and paper, and later with the computer, if I do not understand I ask.   2019-01-18, 19:47   #9
retina
Undefined

"The unspeakable one"
Jun 2006
My evil lair

2·23·137 Posts Quote:
 Originally Posted by Godzilla @retina ... copy the code to a text file and save it with filename.py, open python and run it.
With names like equTwooo that ain't gonna happen.    2019-01-18, 22:04   #10
Mysticial

Sep 2016

5308 Posts Quote:
 Originally Posted by retina This code is totally awesome Such beautiful variable naming Such consistent spacing and alignment Such excellent and useful comments Clearly so much effort expended to make it concise and easy to understand The work of a code god  /sarc Couldn't you at least try to make it readable. Or even tell us what interpreter/language it is?
Obligatory:
Attached Thumbnails   2019-02-06, 15:10 #11 jrsousa2   Dec 2018 Miami 1D16 Posts what a strange math forum this is. People are always bickering. and when you ask something serious, no response, but BS always get answers.   Thread Tools Show Printable Version Email this Page Similar Threads Thread Thread Starter Forum Replies Last Post siegert81 Factoring 1 2018-04-16 22:53 MARTHA Number Theory Discussion Group 11 2018-03-02 15:55 bloodIce PrimeNet 10 2011-03-12 18:51 Unregistered Homework Help 4 2010-08-04 06:38 Mini-Geek Software 7 2008-01-14 17:33

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

Wed Dec 1 03:56:43 UTC 2021 up 130 days, 22:25, 1 user, load averages: 1.92, 1.39, 1.33