Is it possible to construct primes with arbitrary messages in them?

103 Views Asked by At

Motivation: A friend of mine told me that the number gained by interpreting the binary code of is quite often a prime. A slight copyright themed discussion later and after developing an algorithm to make any visual medium a prime:

While(notPrime): mutate

The question arose if there is a wasteful lossless encoding of the form:

Number Data Encodinginformation

e.g.:

Encode "a" as

10110000101111

which is: 1 (number sought to make it prime) 01100001(ascii for "a") 0111(encoding of length of String) 1(always last number to ensure the number is odd) Math Question:

given a number $n$ coprime to $b$ is there a prime of the form $$p=n+\sum_{i=k}^m a_ib^i$$ where $a_i\in\{0,\ldots,b-1\}$, $m$ is arbitrary and $k=\lceil log_b(n) \rceil$?

1

There are 1 best solutions below

0
On BEST ANSWER

As Yves and Mastrem pointed out: One can find infinitly many of those primes because of Dirichlets Theorem one just has to realize that

$n+\sum_{i=k}^ma_ib^i = n + b^k \sum_{i=0}^m\tilde{a}_ib^i$

and that trivially $a$ is coprime to $b^k$ as it is coprime to $b$.