mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Reply
 
Thread Tools
Old 2019-01-18, 09:20   #1
Godzilla
 
Godzilla's Avatar
 
May 2016

101000102 Posts
Default 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
Godzilla is offline   Reply With Quote
Old 2019-01-18, 15:46   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

961510 Posts
Default

Quote:
Originally Posted by Godzilla View Post
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)?
Batalov is offline   Reply With Quote
Old 2019-01-18, 16:20   #3
Godzilla
 
Godzilla's Avatar
 
May 2016

2·34 Posts
Default

Quote:
Originally Posted by Batalov View Post
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
Godzilla is offline   Reply With Quote
Old 2019-01-18, 18:24   #4
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by Batalov View Post
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 View Post
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.
CRGreathouse is offline   Reply With Quote
Old 2019-01-18, 18:46   #5
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

2×23×137 Posts
Default

Quote:
Originally Posted by Godzilla View Post
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?
retina is offline   Reply With Quote
Old 2019-01-18, 19:21   #6
Godzilla
 
Godzilla's Avatar
 
May 2016

2×34 Posts
Default

@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.
Godzilla is offline   Reply With Quote
Old 2019-01-18, 19:22   #7
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

3×5×641 Posts
Default

Quote:
Originally Posted by Godzilla View Post
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?
Batalov is offline   Reply With Quote
Old 2019-01-18, 19:34   #8
Godzilla
 
Godzilla's Avatar
 
May 2016

2×34 Posts
Default

Quote:
Originally Posted by Batalov View Post
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.
Godzilla is offline   Reply With Quote
Old 2019-01-18, 19:47   #9
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

2·23·137 Posts
Default

Quote:
Originally Posted by Godzilla View Post
@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.
retina is offline   Reply With Quote
Old 2019-01-18, 22:04   #10
Mysticial
 
Mysticial's Avatar
 
Sep 2016

5308 Posts
Default

Quote:
Originally Posted by retina View Post
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
Click image for larger version

Name:	cozohvgr2h7z.png
Views:	146
Size:	428.4 KB
ID:	19694  
Mysticial is offline   Reply With Quote
Old 2019-02-06, 15:10   #11
jrsousa2
 
Dec 2018
Miami

1D16 Posts
Default

what a strange math forum this is. People are always bickering. and when you ask something serious, no response, but BS always get answers.
jrsousa2 is offline   Reply With Quote
Reply

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

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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.