wakanda-forever's blog

By wakanda-forever, history, 13 months ago, In English

Hello Codeforces,

Recently I was trying to make a number theory problem, I haven't framed the entire question yet but the core part goes something like this $$$-$$$ Given an integer $$$a$$$, find an integer $$$b$$$ ($$$ \le a $$$) such that $$$gcd(a,b)$$$ $$$+$$$ $$$lcm(a,b)$$$ is a prime number.

The condition $$$gcd(a,b)$$$ $$$+$$$ $$$lcm(a,b)$$$ is a prime number boils down to $$$gcd(a,b) = 1$$$ and $$$a \cdot b + 1$$$ is a prime where $$$b \le a$$$.

I tried brute-forcing $$$b$$$ by fixing $$$a$$$ and I found that there exists such $$$b$$$ for all $$$1 \le a \le 10^5$$$. However, I am not sure whether there exists such $$$b$$$ for all $$$a$$$. Does anyone have a formal or intuitive proof why this is happening and is there any approach to find $$$b$$$ given $$$a$$$ ?

  • Vote: I like it
  • +37
  • Vote: I do not like it

| Write comment?
»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by wakanda-forever (previous revision, new revision, compare).

»
13 months ago, hide # |
Rev. 4  
Vote: I like it +17 Vote: I do not like it

This is kind of guaranteed by Dirichlet's Theorem

However using that theorem the condition $$$b \leq a$$$ isn't guaranteed. It still seems very likely to be true for all $$$a$$$, as it would be a very unexpected coincidence for all $$$a$$$ choices of $$$b$$$ value to 'skip' being primes, as primes are pretty dense.

  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it +12 Vote: I do not like it

    Linnik's theorem and GRH currently give an unconditional bound for the least prime (p) satisfying

    $$$ p \equiv b \pmod{a} $$$

    for any coprime pair (a,b) in the form

    $$$ p \lt a^x. $$$

    Under GRH, one can take (x < 3), while unconditionally (by Linnik’s theorem) one has (x <= 5). If someone were ever to prove a bound with $$$ x \lt 1 $$$ , that would be a major breakthrough in number theory.

»
13 months ago, hide # |
 
Vote: I like it +41 Vote: I do not like it

Don't let this guy be a problem setter on div. 2 please

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I think there is something to do with phi function