Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I think I have worked out a formula for Prime Numbers

Status
Not open for further replies.

smslca

Member level 1
Joined
Sep 9, 2007
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,656
Is that a Formula???

I think I have worked out a formula for Prime Numbers. I said, "I think," because

1. I dont know , Is that formula already there at present.
2. I dont know , does what I found is really should be called as a Formula.

I made the 2nd point because, In these Type of formulas, For ex take " prime numbers "There must be solution for every given natural number(N).

--Actually this Equation generates all Primes, But with some non-primes for a given N.
So what I actually mean is There misses some N values in the series.

--There are two simple equations to generate Primes along with non-Primes.

**--I have created/discovered/worked out equations for the values of N with non-primes.
That mean If N satisfies the equation it is the non-prime N.

-- There are total of 40 equations to eliminate the non-primes. In which only 4 or 6
equations are used for each N.

**--I mainly doubt it as a formula because, there are just two same variables in all 40
equations, since each equation is unique and different from other, no two equations
can be equated to solve for variables.

So, We have to guess one variable, and for larger N value, guessing will become more
difficult.

As I said for each N we have to use 4 or 6 eqns , as per my caluculations, for each eqn
requires N/30 guessings. If we have luck in the first equation, it ends with N/30, But if it
goes to last 6 th eqn we have to do, 6*n/30=N/5 guessings.

** You must know that Here N does not represent the conventional 1,2,3,4,.... series
N, because in that N is normal numbers and prime Numbers ex. N=2 is a prime Number.
But In my equation, N=2 creates a prime.

What I want to say is that N/30 is different from conventional N/30 and is far more
less value than conventional.

-- The guessing values has a pattern We must follow to get the value. It is not selected
at random.

achievements with this equation.
--------------------------------

-- I have created a C program by using those equations without eliminating the non-primes. So by using logics we could
generate the whole list of primes.
** The "Time" it took is the important part of eqn:
In my Windows XP, Intel pentium 4, 2.66Ghz, 960MB ram system,
To generate first billion Primes, It took, approximately (not accurate)
1. >22.5 hrs for conventional method
/* To generate Prime numbers by conventional method */
#include <stdio.h>
main()
{
int n,i=1,j,c;
printf("Enter Number Of Terms");
printf("Prime Numbers Are Follwing");
scanf("%d",&n);
while(i<=n)
{
c=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
c++;
}
if(c==2)
printf("%d ",i);
i++;
}
getch();
}

2. 7-9hrs or greater about extra 3-4 hrs for the fastest method I found.

/******************************
* THIS IS THE EASIEST
* METHOD OF GENERATING
* PRIME NUMBERS USING C
* MADE BY: githambo@gmail.com
*******************************/
#include<stdio.h>
#include<math.h>
int main()
{
int i,j,h,n;
printf("Start:\a\n");
scanf("%d",&n);
printf("End?\n\a");
scanf("%d",&h);
for(i=n;i<h;i++)
{
for(j=2;j<i;j++)
{
if(i%j==0)
break;
}
if(i==j)
printf("%d\t",j);
}
getch();
}

3. By my method, it took 2-3 hrs.


-- *** These eqns can even find the factors for the product of prime numbers.
It took less than 00:00:00.25secs(hr:min:sec.msec form) to factorize the value of
2,147,483,641 , I took it because 2,147,483,647 is the last value I can give to that
program using C or to my computer.

-- I dint write a program by eliminating non-primes because, there is a problem due to guess
of values to the variables.
If any one just finds any pattern and get another equation with the same variables finding
factors for a large ie of any large product of primes will be done in less than a second.

There must be some pattern lurking in the process I done.


Upto Now I didnot reveal the equation, because,

I read somewhere, If U find a formula for primes U will be popular.
"**If what I have worked out is a formula**",(when judged by others) Then I wll get fame .
I like to be famous and popular, if there is my name just near to the formula I will be so
happy. Also my sister's name who helped me.

In the Internet in Wikipedia I read about "Peer review", I cant understand it clearly because I dont know English perfectly.
So what is the Peer Review, and where are the places, I can submit my work to be judged, as formula or as piece of waste.
I also read that we can get patent for a computer program involving mathematical formula, and which can be useful for many other purposes. So If it is a formula discovered only by me can I get patent for the C program I created.

Please Read the whole matter carefully and answer to my questions written "In the first" and "At the last".
 

Re: Is that a Formula???

1) Your description isn't complete so how can one say that it is a formula.

2) Good dream of good things but if you do something for just fame, you'll usually fail as you'll overlook the details. When you'll discover something, you'll be pumped up which will affect your thinking. So if you think you found something, render it useless for some period of time and work on something ELSE. Then go back to your work and hopefully you yourself will find the needed improvements.

3) Peer review means, the review of an article/paper about some experiment/discovery/formula etc. by other experienced/knowledgable people in the same filed.

4) Some of the points that can be used to judge your work
a) You mention that at worst case one will need to make N/5 guesses. You'll need to prove that mathematically.
b) Is your formula true for small primes as well as large primes?
c) Given a number can it detect whether it is a prime or not?

5) You can look at "Ask Dr. math" and buy a copy of "Joy of Mathematics". They are basic and I hope you'll not need that knowledge but going back to basics is a good idea to check the end solution.
 

Re: Is that a Formula???

microKernel said:
1)

4) Some of the points that can be used to judge your work
a) You mention that at worst case one will need to make N/5 guesses. You'll need to prove that mathematically.
b) Is your formula true for small primes as well as large primes?
c) Given a number can it detect whether it is a prime or not?

5) You can look at "Ask Dr. math" and buy a copy of "Joy of Mathematics". They are basic and I hope you'll not need that knowledge but going back to basics is a good idea to check the end solution.

4-a. Sure it can be proved mathematically
4-b. 100% sure, It will work for all primes
4-c. Sure it can detect whether it is a prime or not also if it is a product of prime, it can factorize it.

As I said It could factorize very fast than other conventional methods. But I wont say it is the fastest.

5. I have full set of "Joy of Mathematics" Videos.

Added after 53 seconds:

But I am somewhat not perfectly sure the method to factorize is New. I have already done some work.

Ok since there is already a formula I should show mine, without applying to any peer review or any other.
I dont know any mathematics lecturer or teacher neat to me to show my work. What should I do ???
As I already said, I dont know this eqn is already present of not. And I wont say my work is best compared to others.
I am worried about fame because, I have worked on this for 3 full weeks, without doing any other works.

(2)But I am sure that "just One more pattern found in my work, it further reduces the time to factorize, as compared to the present program written by me." It involves loops.

(3)And If any one can find " one more relationship between the two variables and can be solved then The factorization of very very long primes will be an instant i.e takes a second." . It means it doesnt require any loops to factorize product of primes

If any one can write a program to below order of multiplication, As they are sorted in an increasing order, it reduces the time taken to factorize by the present program by me. But not less time what I said in (2).
07*13=91
07*23=161
17*13=221
07*43=301
07*53=371
17*23=391
37*13=481
07*73=511
07*83=581
47*13=611
07*103=721
17*43=729

Here U can observe that "only digits front to the unit digits are only changing" and there are no numbers 2,5,7,------- 2+3x before 7, and 3,6,9,-------------------3x where x=0,1,2,3,--------- as they generates multiples of 3.
 


Is that a Formula???

in "A new kind of Science" Dr .Wolfram talks about his formula and algrothem for finding all prime numbers using a computer to solve a specific autotoma(sp?)
 

4-c. Sure it can detect whether it is a prime or not also if it is a product of prime, it can factorize it.

Allow me to suggest a number to test that on:

11917593136138210500233156849348950912325570422231192052817247462122501177358366284808714027172663790155599626543773972885084704043645936466775808200509791780082437131199036367108404629518987832746806424515898652831044581286650640236071577232992317184574105104471426348649573247538643624694611550328499109109189260058344673246805517213955198235265625774734477709045150526978799560625338027004271722434248539139596336359813867398072921089143153345913591027868272482034992403869239647484411004700127701063950156782806797846787399943250722025629611701609415784573795518093989537568713735350760579564657784357559717651774620982754226117314586156664778359591998747928730669859679040598190515271157163090691240335972987048240451274280447954523197884221373202719631711651560149674172652549068093792231116777463881619021659829109930422161651306403711295026946372308621521343505289454113116537196632199319101906902845485204304533507050090252924127999150940444006550380154035422874405221980138178051096866051573717899891409410696095498370152849478137225179000709

Please let us know what you find. (and no, this no joke since I did the same thing over here. :p )
 

Is this the correct solution?

32416 182577 x 32416 182583 x 32416 182637 x 32416 182647 x 32416 182683 x
32416 182697 x 32416 182713 x 32416 182719 x 32416 182731 x 32416 182779 x
32416 182817 x 32416 182859 x 32416 182899 x 32416 182923 x 32416 182937 x
32416 182949 x 32416 182991 x 32416 183001 x 32416 183021 x 32416 183027 x
32416 183039 x 32416 183067 x 32416 183069 x 32416 183099 x 32416 183103 x
32416 183169 x 32416 183193 x 32416 183229 x 32416 183237 x 32416 183291 x
32416 183337 x 32416 183339 x 32416 183351 x 32416 183409 x 32416 183421 x
32416 183439 x 32416 183469 x 32416 183477 x 32416 183493 x 32416 183507 x
32416 183517 x 32416 183567 x 32416 183577 x 32416 183603 x 32416 183637 x
32416 183643 x 32416 183699 x 32416 183711 x 32416 183721 x 32416 183769 x
32416 183781 x 32416 183783 x 32416 183801 x 32416 183843 x 32416 183861 x
32416 183889 x 32416 183901 x 32416 183907 x 32416 183957 x 32416 183981 x
32416 184011 x 32416 184027 x 32416 184041 x 32416 184051 x 32416 184063 x
32416 184077 x 32416 184089 x 32416 184093 x 32416 184111 x 32416 184113 x
32416 184123 x 32416 184149 x 32416 184159 x 32416 184233 x 32416 184249 x
32416 184263 x 32416 184329 x 32416 184347 x 32416 184387 x 32416 184417 x
32416 184419 x 32416 184531 x 32416 184557 x 32416 184587 x 32416 184611 x
32416 184707 x 32416 184729 x 32416 184741 x 32416 184761 x 32416 184767 x
32416 184771 x 32416 184777 x 32416 184789 x 32416 184821 x 32416 184839 x
32416 184869 x 32416 184923 x 32416 184971 x 32416 184989 x 32416 185001

:|
 

I suggest you develop your algorithm, compare it with any other algorithm from the Number Theory (from those used in encryption) and after that write a book chapter or an article to a Mathematical Journal - maybe SIAM is a good choice to. But at least one respectable math teacher or programmer must have the first word. Good luck.
 
ya I compared it and found that mine is useless for very large numbers.
thanks for ur suggestions.
 

Re: Is that a Formula???

Good work mate. It does work. You may publish this to a journal like LMS or AMS.
 

Re: Is that a Formula???

Mr smslca: dear brother
your post is too old I don't know if it's helpful to answer but I think it's useful to others
I didn't try you code yet 'cause I don't have C++ on my lap
but from examples I think U discovered a way to eliminate silly tries
let's consider one's place in the number 143 - it' 3 which means the product of:
either 1 X 3 or 3 X 1 or 7 x 9 or 9 x 7
One doesn't need to use other possibilities to try
so let's try numbers in this order: 3 x 41 13 x 11 & that's it
for number 323 : try 3 x 101 13 x 21 23 x 11
then 17 x 19 & that's it
is this your way?
I've found this way this year 2014 & I don't know if it's known
but it's too easy to be unknown
if it's a new way I'd like to be redirected to a qualified magazine to check it professionally
thank's to the site to add me just few minutes ago
I'm sorry to comment on this old post I didn't notice that this is from 2010 until now
salamu alikum = Peace on you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top