Questions tagged [prime-numbers]

Prime numbers are natural numbers greater than 1 not divisible by any smaller number other than 1. This tag is intended for questions about, related to, or involving prime numbers.

A prime number (or a prime) is an element of the greater than 1 that has no positive divisors other than 1 and itself. A natural number greater than 1 that is not a prime number is called a composite number ... The fundamental theorem of arithmetic establishes the central role of primes in :

Any integer greater than 1 can be expressed as a product of primes that is unique up to ordering.

Here you get the first 50 millions of primes.


The concept of prime numbers is extended in ring theory, where an element $p$ of a ring $R$ is prime if and only if whenever $p\mid ab$, then $p\mid a$ or $p\mid b$.

One can easily see that this extends the definition of prime numbers in the natural numbers.

12562 questions
3
votes
0 answers

Is "second form" of Fermat's little theorem "stronger" than the first one?

These are the forms I'm talking about: $a^{p}\equiv a\pmod p$ $a^{p-1}\equiv 1\pmod p$ I thought that the only difference was that (1) is true even when p does divide a (producing a trivial 0==0 in that case). But then I found out that (2) seems…
vorou
  • 131
3
votes
1 answer

Are all zeros of $g(n)$ one less than a power of 2?

$f(n)$ is defined such that if $n = 2$, $f(n) = 1$, if $n$ is prime and $1$ more than a multiple of $4$, $f(n) = 1$, if $n$ is prime and $3$ more than a multiple of $4$, $f(n) = -1$, and if $n$ is composite, $$f(n) =…
3
votes
5 answers

Best method to calculate an unknown prime

I'm struggling with primes... I want to create a calculation program which need to check a number to be prime. No problem so far! The problem starts when this number exceeds 48 million. The way my programming will start calculating primes is as…
3
votes
2 answers

In applying Wilson's Theorem, what's the difference between reducing mod $p$ with each multiplication in $(p-1)!$ or reducing all at once?

Wilson's Theorem states (for $p>1$) $$p\;\text{is prime} \quad\iff\quad(p-1)! = -1 \bmod p$$ I was asked the following: Explain the difference in reducing modulo $p$ after each multiplication needed to find $(p–1)!$ or reducing modulo $p$ once…
3
votes
0 answers

Sheldon Cooper Numbers and Cooper primes

Definition: A number $$n = \sum_{i = 0}^{k} d_ib^i$$ is called a Cooper number in base $b$, if $$\pi(n) = \prod_{i = 0}^k d_i$$ and $$\pi(\textrm{rev}(n)) = \textrm{rev}(\pi(n)),$$ where $\pi(n)$ is the prime counting function and $\textrm{rev}(n)$…
3
votes
0 answers

area of a triangle is a prime number

Using six consecutive primes to create the points (59,61), (67,71), and (73,79) as vertices of a triangle with an area of just 2, the first prime of six is 59. Will the area ever again be 2? Can the area ever be an odd prime?
3
votes
2 answers

Ratio of logarithmic primes

Any help is appreciated in proving/disproving the following inequality $$ \frac{\ln{p_{n+1}}}{\ln{p_{n}}} < \frac{n+1}{n} $$
3
votes
0 answers

Conjecture: the similarity of prime numbers to geometric spaces

What, if any, discussion or musing, has sprung from what I take as a logical similarity between prime numbers and the dimensions of any regular geometric space? Consider: Primes, by multiplication, span the space of numbers by allowing some…
Tone
  • 31
3
votes
1 answer

smallest prime factors of $2^k+1$ and $2^m-1$ appear disjoint except for $3$ .

The set of smallest prime factors of numbers of the form $2^k+1$ and the set of smallest prime factors of numbers of the form $2^k-1$ appear to be nearly disjoint, except for $3$ which appears in both sets. Let $p(x)$ denote the smallest prime…
Greg Nisbet
  • 11,657
3
votes
2 answers

Are there infinite many prime-"tuples", for which $p_{n+1}+p_{n+2}−{p_n}=p_{n+3}$

I found this interesting sequence for primes: $2+3=5 $ $7+11-5 = 13$ 17 + 19 - 13 = 23 29 + 31 - 23 = 37 41 + 43 - 37 = 47 Unfornutaley, now the pattern breaks, but comes back: primes = [] c = 0 for possiblePrime in range(2, 20000): # Assume…
TVSuchty
  • 387
3
votes
2 answers

Can anyone tell me about this pattern between $\pi(x)$ and odd square numbers up to $625$?

I'm just a normal "civilian" here, but a little while ago I was playing around with some numbers and noticed this little pattern that worked for $13$ numbers. I tried to google it to get more information, but I couldn't find anything, so I decided…
3
votes
0 answers

A triangular number can produce a prime if 1 is added or subtracted or 2 is added or subtracted.

If a triangular number is even add or subtract 1; if odd, add or subtract 2. Count the number of primes found by subtraction and by addition and it appears that MORE are found by addition than by subtraction. A sample of the first 44 triangular…
3
votes
7 answers

Is $x^4+1$ always prime for even $x$?

From my NT class, someone has thought of proving $x^4+1$ is always a prime number for all positive integers $x$ (or at least that is the equivalent of what they said). However, it is clearly false for $x$ is odd. For $x$ is even seems like always a…
Jason Kim
  • 902
3
votes
5 answers

The square of a prime is one greater than a multiple of 24?

I read that the square of any prime number, excluding 2 and 3, is one greater than a multiple of 24. Is this a conjecture or a theorem? It's hard for me to imagine how such a thing could be proven.
poetasis
  • 6,338
3
votes
0 answers

Algorithm to find prime numbers

For a loop up to positive integer $n$, I have deduced an algorithm that provides me with all the prime numbers plus some odd numbers, for example for $n=10000$ my algorithm gives me the count $1260$ while prime are $1229$. In order to avoid the…