2
$\begingroup$

Is $(p-1)!+p$ a prime for every prime $p$? It looks unlikely but I cannot get an example that will do. Also by trying to prove it by assuming a prime factor greater than $p$ and less than $(p-1)!+p$, I am not getting anything. Some more techniques of proof that may help or even a direct answer is appreciated.

$\endgroup$
5
  • $\begingroup$ @Coolwater for every prime $p$ $\endgroup$
    – TomGrubb
    Commented Jan 29, 2016 at 17:40
  • 1
    $\begingroup$ So far as I know there is no known prime number generator. Not being able to come up with a counter example isn't a good reason to think something is true. $\endgroup$
    – fleablood
    Commented Jan 29, 2016 at 17:42
  • 1
    $\begingroup$ @fleablood There are many prime number generators, starting with Euclid's algorithm. What you probably mean is there are no efficient prime number generators. $\endgroup$ Commented Jan 29, 2016 at 17:44
  • 1
    $\begingroup$ Probably I do mean that. How is Euclid's algorithm a prime number generator? I suppose the simplest way to find primes would be to simply go through every number and check whether it is prime or not but that can't be said to "generate" primes can it? $\endgroup$
    – fleablood
    Commented Jan 29, 2016 at 17:55
  • 2
    $\begingroup$ @fleablood Yes, that is a prime generator :) Anything you can write in a list comprehension (and more) can be said to be a prime number generator. In Maths, you don't care how a function generates its output. Its a black box. If that black box is the Sieve Of Eratosthenes and F(5) is just the 5th prime the sieve spits out, it is a prime generator function. You don't care that it doesn't efficiently compute it because it is a line on a piece of paper and not a computer churning out madly. $\endgroup$
    – Lan
    Commented Jan 29, 2016 at 18:28

2 Answers 2

12
$\begingroup$

You just didn't go far enough. While $(p-1)! + p$ is prime for $p = 2, 3, 5, 7, $ and $11$, it is composite for $p = 13, 17, 19, 23, 29, 31, 37, 41, 43,$ and $47$. $p = 53$ is the next prime for which it is true.

$\endgroup$
1
  • 5
    $\begingroup$ In fact, this accounts for all of the primes of this form for $p < 1250$. See oeis.org/A100858 $\endgroup$ Commented Jan 29, 2016 at 17:46
8
$\begingroup$

$$12!+13=29\cdot 2503\cdot 6599$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .