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

learn more… | top users | synonyms

2
votes
2answers
31 views

Proof that if $k$ is the highest factor of any positive integer $n$ such that $k<n$, then $n/k$ is prime

It's straightforward to say that when $n$ is prime, $k=1$ since $k$ must be less than $n$. For the case where $n$ is not prime, I thought proving that the lowest factor of $n$ is prime would be the ...
4
votes
1answer
105 views

Elementary proof there are infinitely many primes of the form $4n+1$

My attempt: $4n+1$ is odd. Thus its decomposition must not contain $2$. Every odd number is either of the form $4k-1$ or $4m+1$. $(4m+1)(4k-1)$ is never of the form $4n+1$. So $4n+1$ has factors ...
-1
votes
2answers
105 views

Why is $y^{x-1}-1$ divisible by $x$?

I wanted to know if there is a way to prove that $y^{x-1}-1$ is divisible by $x$. Where $x$ is a prime number and is not equal to $y$, and $y$ is any positive whole number besides $1$. For example, ...
-1
votes
0answers
38 views

Happy prime equation

I read that a happy number is: A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and ...
1
vote
0answers
45 views

Sequence of primes by concatenating digits in a given base.

Given a base, $b$ is there is a sequence $\lbrace a_n\rbrace_{n\geq 0}$ where $a_k \in \lbrace 1,2\cdots, b-1\rbrace$so that the sequence: $$b_n:= \sum_{k=0}^n a_kb^k$$ is a sequence of primes ...
1
vote
1answer
35 views

Digit wise modulo for calculating power function for very very large positive integers

I am writing a code to calculate $P^Q$ where $P$, $Q$ are positive integers which can have number of digits up to $100000$. I want the result as $r = P^Q \pmod{10^9+7}$, where $10^9+7$ is a prime ...
0
votes
4answers
122 views

How do you go about finding a 12 digit prime number?

How do you go about finding a 12 digit prime number?
4
votes
1answer
56 views

Meaning of Rays in Polar Plot of Prime Numbers

I recently began experimenting with gnuplot and I quickly made an interesting discovery. I plotted all of the prime numbers beneath 1 million in polar coordinates such that for every prime $p$, ...
3
votes
1answer
95 views

Why is $p_n\sim\sum_{k=1}^{n}\log(p_k)$?

Why is $$ p_n\sim\sum_{k=1}^{n}\log(p_k) $$ where $p_n$ is the $n$th prime? In addition, is it true that $$ n\log\left(\dfrac{\sum_{k=1}^{n}\log(k)}{\log(\log(n))}\right) $$ is a better ...
1
vote
0answers
43 views

Fast algorithm for generating consecutive primes larger than N

I'm looking for a fast algorithm to generate primes larger than a random 4096 bit number $N$. I know about the Sieve of Atkin, but AFAIK it can only be used to find all primes up to a certain limit. ...
3
votes
0answers
55 views

Cramér's Model - “The Prime Numbers and Their Distribution” - Part 4

Following a previous question (here you'll find an introduction): A paper by Maier which refutes Cramer's Model suggests we should replace the heuristic "$\Bbb P(n\in\mathcal P)=1/\log n$" with ...
1
vote
0answers
25 views

Cramér's Model - “The Prime Numbers and Their Distribution” - Part 3

Following a previous question (here you'll find an introduction): The book states that almost surely $$\pi_S(x+y)-\pi_S(x)=\mathrm{li}(x+y)-\mathrm{li}(x)+O(\sqrt y)$$ as soon as $y/(\log ...
2
votes
0answers
40 views

Cramér's Model - “The Prime Numbers and Their Distribution” - Part 2

Following a previous question (here you'll find an introduction): The book states that using the convergence of the binomial distribution towards the Poisson distribution, it's easy to show that ...
2
votes
1answer
67 views

Finding an $n$ such that $n^2 \equiv -1 \mod p$

What is an efficient algorithm to find the first number $n$ such that $n^2 \equiv -1 \mod p$ for a prime $p$, if such an $n$ exists? Is there anything better than the brute-force approach up to $p-1 ...
14
votes
3answers
880 views

Finitely many Supreme Primes?

A challenge on codegolf.stackexchange is to find the highest "supreme" prime: http://codegolf.stackexchange.com/questions/35441/find-the-largest-prime-whose-length-sum-and-product-is-prime A ...
4
votes
1answer
146 views

Squeezing $\pi(x)$ out of $\psi(x)$

Can $\pi(x)$ be written in terms of $\psi(x)$? I can only seem to approximate it: $$ ...
0
votes
1answer
64 views

Probability with Primes

What is the probability that a positive divisor of $8748$ million is the product of exactly $20$ non-distinct primes? To try and solve this question I split up $8748$ into $2^8 \cdot 5^6 \cdot 3^7 $ ...
1
vote
2answers
43 views

Can't understand source of constant for prime counting function:

Consider the prime counting function $$ \pi(x) = \ the \ number \ of \ primes \ less \ than \ or \ equal \ to \ x$$ It is well known due to the sieve eratosthenes that given an integer $n$ and the ...
1
vote
4answers
149 views

Why didn't Fermat provide proofs of his theorems?

Apparently Fermat stated but didn't provide proofs of various theorems named after him, including Fermat's little theorem, Fermat's theorem on sums of two squares, Fertmat's polygonal number theorem, ...
1
vote
3answers
46 views

First index of number in that arithmetic progression which is a multiple of the given prime number

I have a prime number $p$, an arithmetic progression starting at $a$ with common difference $d$. How to find the first index of a term in that arithmetic progression which is a multiple of the given ...
0
votes
1answer
37 views

Probability and Prime Numbers

What is the probability that a positive divisor of 8748 million is the product of exactly 20 non-distinct primes?
1
vote
0answers
34 views

A Question Related to Zsigmondy's Theorem

I am wondering if there is a way to prove the following statement, which bears some resemblance to Zsigmondy's Theorem. I am not sure if the statement is true, but it seems as though it should be. ...
4
votes
0answers
53 views

Euler's proof of divergence of sum of reciprocals of primes

On Wikipedia at link currently is: \begin{align} \ln \left( \sum_{n=1}^\infty \frac{1}{n}\right) & {} = \ln\left( \prod_p \frac{1}{1-p^{-1}}\right) = -\sum_p \ln \left( 1-\frac{1}{p}\right) \\ ...
3
votes
0answers
46 views

Are there any primes that are never a factor of a Carmichael number?

Is there a prime number $p$ that $p > 2$, and in which $p$ is a never a factor of any Carmichael number $C_n$: (p ∤ $C_n$) Extended this to all numbers $m$, instead of just $p$, will prove the ...
0
votes
1answer
117 views

Primes and the number of digits of the prime [duplicate]

Say $n$ has $k$ decimal digits, all of which are ones. How would you show that if $n$ is prime, then $k$ is prime?
0
votes
1answer
153 views

Let $x = 2441921$. Factor $x$ into a product of primes.

Let $x = 2441921$. Factor $x$ into a product of primes. I found that: $1519^2 −x=−134560= −2^5 ·5 · 29^2$ and $1541^2 −x=−67240= −2^3 · 5 · 41^2$. I am trying to figure out what to do from here. ...
0
votes
2answers
69 views

Represent a prime number $p$ congruent to $1$ $\pmod{3}$ by a sum of a square and $3$ times a square

I want to have a proof of the fact that each prime number is the sum of a square and three times a square (Euler). Context I read the answer to my former question about the number of points on an ...
1
vote
4answers
72 views

$p$ prime, $p\mid a^k \Rightarrow p^k\mid a^k$

Suppose $p$ is a prime and $a$ and $k$ are positive integers. Prove that if $pa^k$ then $p^k\mid a^k$. I have already proven that if $a,b,n\in\mathbb{N}$ and if $a^n\mid b^n$, then $a\mid b$. I tried ...
4
votes
0answers
45 views

Computing question: A quadratic which gives primes [closed]

This is about Project Euler Problem 27. The question is: Considering quadratics of the form $n^2 + an + b$, where $\lvert a \rvert < 1000$ and $\lvert b \rvert < 1000$ Find the product ...
1
vote
1answer
26 views

Length of smallest repunits divisible by primes

I want to prove this statement from Wikipedia: It was found very early on that for any prime p greater than 5, the period of the decimal expansion of 1/p is equal to the length of the smallest ...
3
votes
2answers
55 views

Prove that every non-prime natural number $ > 1$ can be written in the form of $n+(n+2)+(n+4)+…+(n+2m) = p$

I'm trying to prove that every non-prime natural number greater than $1$ can is equal to a sum of consecutive even or odd numbers. This can be resumed in : « $p,m,n \in ℕ$» , «$p > 1$» , «$n > ...
3
votes
0answers
35 views

Probability and sums of prime factors

Of the first N natural numbers, we select two different numbers at random. We'll call the greater one A and the lesser one B. What is the probability (P) that the sum of A's prime factors is LESS than ...
0
votes
0answers
29 views

Find a criterion for the primes p such that (5/p) = 1. [duplicate]

Find a criterion for the primes p such that (5/p) = 1. I don't understand this question it is like Determine all primes P such that (5/p)=1 I appreciate any help
28
votes
5answers
693 views

Can a Mersenne number ever be a Carmichael number?

Can a Mersenne number ever be a Carmichael number? More specifically, can a composite number $m$ of the form $2^n-1$ ever pass the test: $a^{m-1} \equiv 1 \mod m$ for all intergers $a >1$ ...
29
votes
2answers
4k views

Are weird numbers more rare than prime numbers?

By taking a look at the first few weird numbers: $$(70, 836, 4030, 5830, 7192, 7912, 9272, 10430)$$ It is certain that prime numbers occurs more often within this range of numbers. But are weird ...
5
votes
5answers
132 views

What is the proof to the fact that all prime numbers are 1 above or below a 6 multiple? [duplicate]

I was just having an argument with my friend and I dunno how we got here. But he suddenly said all primes are 1 above or below a multiple of 6. At first I tried a lot of primes but couldn't disprove ...
0
votes
1answer
27 views

Divisibility of $a^p-r$ and $a^q-r$ by the primes $p,q$

Let $p, q$ be prime and $a$ some positive integer such that $a = pq + r$ where $r$ is the remainder. Show that $p \mid a^p – r$ and $q \mid a^q – r$. Example: $p = 3$ and $q = 5$, $a = 17$ and $r = ...
1
vote
1answer
108 views

Andrica's conjecture implies Bertrand's Postulate?

Let $p_n$ denote the $n$th prime. Recall Andrica's conjecture, which states that $$\sqrt{p_{n+1}}-\sqrt{p_n}<1\quad\text{ for all }\,n.$$ I think Andrica's conjecture implies Bertrand's postulate. ...
3
votes
1answer
62 views

If $p$ is prime, prove that $\exists k\in\lbrace 5,-7,9,-11,..\rbrace$ in $(\mathbb{Z}/p\mathbb{Z})^*$ so that the Legendre symbol $(\frac{k}{p})=-1$

The BSPW primality test, when given $p$ as input, iterates over $k \in \lbrace 5,-7,9,-11,...\rbrace$ as long as the Legendre symbol $(\frac{k}{p})=1$. If $(\frac{k}{p})=0$, it returns "composite". So ...
-3
votes
1answer
55 views

Billion-Digit Prime Number [closed]

I am trying to identify a billion-digit prime number in the form 10^(10^9) + x. This number could be found in the form NextPrime[10^(10^9)], but I do not want to look at a billion digits. To do this, ...
3
votes
0answers
92 views

The n-envelope problem

This is original problem: You have n number of envelopes, and 100 $1 bills. you have to put these bills in the envelopes in such a way that any amount between 1 to 100 can be reached just by ...
4
votes
0answers
69 views

Are large prime numbers kept secret? [duplicate]

I've read several times that modern cryptography is based on the fact that multiplying two primes is easy, whereas getting the prime factorization of a random big integer is very hard. (see here) ...
1
vote
1answer
55 views

Limit of Sum $\sum \frac{p(k+1) - p(k)}{p(k)^2}$ ? (corrected)

This is a re-post with my (corrected) earlier typo in red as a reminder. The question is about $$(A)\hspace{10mm}\lim_{n \to \infty} \sum_{k=\color{red}2}^{n} \frac{p(k +1) - p(k)}{p(k)^2} = ...
3
votes
1answer
105 views

Showing that if $p$ is prime, then $(p^4 + 4)$ can't be prime

I want to show that if $p$ is prime, then $(p^4 + 4)$ can't be prime. I guess Fermat's little theorem may help, but I can't figure out how to use it for the proof. Can anyone point me in the right ...
2
votes
1answer
104 views

Are there infinitely many prime numbers? [duplicate]

I will post my own answer below. That should not deter others from answering. There are many ways to prove this.
1
vote
1answer
28 views

Sizes of Blocks of Consecutive Integers Divisible by at Least One Prime Less than or Equal to $r$.

Let $f(r)$ be the largest integer such that there exists a block of $f(r)$ consecutive integers each divisible by some prime that is less than or equal to $r$. For example, $f(2)=1$ because it is ...
3
votes
0answers
54 views

An Inequality with Prime Numbers

Let $m\geq 8$ be an integer, and let $q$ be the smallest prime that is greater than $m$. Let $p$ be a prime that satisfies $q\leq p<q^2$, and let $p_0$ be the smallest prime such that ...
2
votes
1answer
44 views

For an integer $n \geq 2$, let $m$ be the largest positive integer less than $n$ such that $m \mid n$. [closed]

Consider an integer $n \geq 2$, and $m$ the largest positive integer less than $n$ such that $m \mid n$. Then $n = mk$ for some positive integer $k$. Prove that $k$ is a prime number.
1
vote
2answers
220 views

Visualization of Eratosthenes’ sieve

In otherwise great paper on prime numbers, I found following visualization of Eratosthenes’ sieve: I found it somewhat scary and confusing. Is there any better visualization of Eratosthenes’ sieve ...
1
vote
0answers
47 views

Prime bounds under RH

Continuing from here, since $$ \sum_{k=1}^{\lfloor\log(n)\rfloor}\dfrac{\pi(n^{1/k})}{k}=\operatorname{li}(n)-\sum_{k=1}^{\infty}2\ ...