My Math Forum (http://mymathforum.com/math-forums.php)
-   Number Theory (http://mymathforum.com/number-theory/)
-   -   Not primes formula? (http://mymathforum.com/number-theory/339303-not-primes-formula.html)

 TheNewOne March 2nd, 2017 07:51 PM

Not primes formula?

Hello, I'm new in this forum and sorry about my English is not the best, English is not my mother language.

Okay I was fascinated with Mersenne primes, so I started playing with them.
2^p – 1 = 2^p – (2-1) = 2^p – (2-1)^p-1
Then I started changing p with n, where n is a integer:
(2)^(n)-(2-1)^(n-1) I know that this is only a mersenne prime only if n is a prime number and not every prime. Then I change 2 with x just for fun
(x)^n-(x-1)^n-1 and long story short (I can explain more but I only want to know if this is a thing because I don’t know how to search this) if n = 6p+2
where p is an integer there is no x that I found there the equation
(x)^n-(x-1)^n-1 is prime and if n takes any other value there is a x where the result of the equation is prime
Formula = (x)^n – (x-1)^n-1
Números:
1- 4^1-3^0 = 3 is prime
2- 2^2-1^1 = 3 is prime
3- 2^3-1^2 = 7 is prime
4- 3^4-2^3 = is prime
5- 2^5-1^4 = 31 is prime
6- 4^6-3^5 = 3853 is prime
7- 2^7-1^6 = 127 is prime
8- ¿? I have check pass x = 10.000
9- 3^9-2^8 = 19427 is prime
10- 3^10-2^9 = 58537 is prime
11- 3^11-2^10 = 176123 is prime
12- 3^12-2^11= 529393 is prime
13- 2^13-1^12 = 8191 is prime
14- ¿? I have check pass x = 10.000
I have called this not prime formula because every number when n = 6p+2 is not prime so this could help to find number not primes.

 Maschke March 2nd, 2017 08:10 PM

> (x)^n – (x-1)^n-1

I'm assuming you mean (x)^n - (x-1)^(n-1)?

$\displaystyle 4^3 - 3^2 = 64 - 9 - 55 = 5 \times 11$.

Am I understanding your idea correctly?

 TheNewOne March 2nd, 2017 08:17 PM

A little bit but can you find a x where the equation is prime if n = 8

 Maschke March 2nd, 2017 08:21 PM

Quote:
 Originally Posted by TheNewOne (Post 563386) A little bit but can you find a x where the equation is prime if n = 8
I don't understand. Sometimes $\displaystyle x^n - (x-1)^{n-1}$ is prime and sometimes it's composite. I don't think there's any particular pattern to it. I don't understand what you're trying to say.

$\displaystyle 8^1 - 7^0 = 7$, prime, and $\displaystyle 8^2 - 7^1 = 57 = 3 \times 19$, composite.

 TheNewOne March 2nd, 2017 08:28 PM

Sorry about not being able to explain. I know that some times the equation is prime and sometimes is composite but to simplify the problem try to solve this y = x^8 - (x-1)^(7) where y is prime and x is greater than 1

 Maschke March 2nd, 2017 08:35 PM

Quote:
 Originally Posted by TheNewOne (Post 563388) Sorry about not being able to explain. I know that some times the equation is prime and sometimes is composite
That's the problem. Sometimes it's prime and sometimes composite.

Quote:
 Originally Posted by TheNewOne (Post 563388) but to simplify the problem try to solve this y = x^8 - (x-1)^(7) where y is prime and x is greater than 1

ps --

$\displaystyle x^8 - (x-1)^7 =(x^2 -x + 1)(x^6 - 6x^4 -15x^3 +14x^2 -6x +1 )$

so it's always composite.

If the geniuses of the past had Wolfram Alpha, think what they could have done!

https://www.wolframalpha.com/input/?i=x%5E8+-+(x-1)%5E7

 TheNewOne March 2nd, 2017 08:47 PM

I'm a computer scientis and I made a program to check that equation and I have checked until x = 10.000 and no solution I don't know if I have a bug or something or if there are no solution I have a slow computer and the number to check are a bit large so I haven't check bigger numbers

 Maschke March 2nd, 2017 09:16 PM

Quote:
 Originally Posted by TheNewOne (Post 563390) I'm a computer scientis and I made a program to check that equation and I have checked until x = 10.000 and no solution I don't know if I have a bug or something or if there are no solution I have a slow computer and the number to check are a bit large so I haven't check bigger numbers
Now you can check the factorizations on Wolfram Alpha before writing code. As a matter of fact I have no idea how computer algebra systems like that work. You may have heard that there is no general algebraic solution to polynomial equations of degree greater than 4. In other words there's a quadratic formula, and in fact there are cubic (3rd degree) and quartic (4th degree) formulas. But there is no general formula for the quintic or higher.

So what I wonder is, how does Wolfram Alpha do these factorizations? Does it use brute force or are there some shortcuts?

There are other computer algebra systems out there. I don't know anything about them. But if you need to factor a lot of big polynomials, there is software out there to do it.

One more thing, you know of course that for number theory, programs can give clues but can never prove anything. There are examples of patterns that continue to very large numbers but fail in general.

 TheNewOne March 2nd, 2017 09:34 PM

Quote:
 Originally Posted by Maschke (Post 563392) Now you can check the factorizations on Wolfram Alpha before writing code. As a matter of fact I have no idea how computer algebra systems like that work. You may have heard that there is no general algebraic solution to polynomial equations of degree greater than 4. In other words there's a quadratic formula, and in fact there are cubic (3rd degree) and quartic (4th degree) formulas. But there is no general formula for the quintic or higher. So what I wonder is, how does Wolfram Alpha do these factorizations? Does it use brute force or are there some shortcuts? There are other computer algebra systems out there. I don't know anything about them. But if you need to factor a lot of big polynomials, there is software out there to do it. One more thing, you know of course that for number theory, programs can give clues but can never prove anything. There are examples of patterns that continue to very large numbers but fail in general.
Nowadays, brute force is not a slow method; computers are getting faster and faster. I don't know exactly how Wolfram works but I would say that is a combination of cleverness and brute force.
For example, if you want to check if a number is prime you need to see if all number below n are coprimes but if you think a little bit you only need to check the square root of n.

 skipjack March 2nd, 2017 11:45 PM

Quote:
 Originally Posted by Maschke (Post 563392) . . . for number theory, programs can give clues but can never prove anything.
That's clearly incorrect. For example, a program could prove a number is composite by finding a factorization of it.

 All times are GMT -8. The time now is 04:52 AM.