# Tagged Questions

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.

116 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 ...
64 views

### Median primes and cryptography

I've been considering something involving median numbers. If an integer is directly in the middle of two integers, is it possible to accurately extrapolate what two it is between? Can a prime be in ...
51 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 ...
170 views

89 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. ...
### RSA - finding $p$ and $q$
If the public key $(e,n)$ and the private key $(d,n)$ are known, how can I find the $p$ and $q$ primes by the easiest way? When $n$ and $\varphi(n)$ are given was easy to solve, but this issue I can't ...