![]() |
|
|
#1 |
|
May 2016
2428 Posts |
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 |
|
|
|
|
|
#2 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
224058 Posts |
Quote:
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)?
|
|
|
|
|
|
|
#3 | |
|
May 2016
2·34 Posts |
Quote:
--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 |
|
|
|
|
|
|
#4 | |
|
Aug 2006
3·1,993 Posts |
Quote:
|
|
|
|
|
|
|
#5 | |
|
Undefined
"The unspeakable one"
Jun 2006
My evil lair
140648 Posts |
Quote:
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? |
|
|
|
|
|
|
#6 |
|
May 2016
A216 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. |
|
|
|
|
|
#7 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
100101000001012 Posts |
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? |
|
|
|
|
|
#8 | |
|
May 2016
2428 Posts |
Quote:
|
|
|
|
|
|
|
#9 |
|
Undefined
"The unspeakable one"
Jun 2006
My evil lair
183416 Posts |
|
|
|
|
|
|
#10 | |
|
Sep 2016
22·83 Posts |
Quote:
|
|
|
|
|
|
|
#11 |
|
Dec 2018
Miami
29 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 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Independent GPU factoring | siegert81 | Factoring | 1 | 2018-04-16 22:53 |
| Let y^2=xz-x^2+1, and if value of x is known, can y and z be directly calculated? Given all variable | MARTHA | Number Theory Discussion Group | 11 | 2018-03-02 15:55 |
| Is there independent check for found factors? | bloodIce | PrimeNet | 10 | 2011-03-12 18:51 |
| Exponentiation w/ independent variable | Unregistered | Homework Help | 4 | 2010-08-04 06:38 |
| Variable FFT sizes | Mini-Geek | Software | 7 | 2008-01-14 17:33 |