Found an interesting Number Theory property
Difference between en3 and en4, changed 0 character(s)
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$ ? 

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English wakanda-forever 2025-03-29 09:45:41 0 (published)
en3 English wakanda-forever 2025-03-29 09:43:31 48 Tiny change: 'happening ? ' -> 'happening and is there any approach to find $b$ given $a$ ? '
en2 English wakanda-forever 2025-03-29 09:39:35 0 Tiny change: 'happening ? ' -> 'happening and c ? '
en1 English wakanda-forever 2025-03-29 09:37:14 700 Initial revision (saved to drafts)