The nth prime calculator How to prove the correctness of the following algorithm :

Input: $n$ : the ordinal number
Output: $x$ : the nth prime number
$b_1=6$ , $b_2=6$ , $b_3=6$
If $n==1$ , then $x=2$ , else $x=3$
$k=4$ , $m=3$
While $m \leq n$ do:
$\phantom{5}$ $b_4=b_1+ \operatorname{lcm}(k-2,b_1)$
$\phantom{5}$ $a=b_4/b_1-1$
$\phantom{5}$ $k=k+1$
$\phantom{5}$ $b_1=b_2$ , $b_2=b_3$ , $b_3=b_4$
$\phantom{5}$ If $x<a$  then $x=a$ , $m=m+1$
Return $x$

You can run this code here .
GUI application that implements this algorithm can be found here .
Fast command line program that implements this algorithm can be found here .
I can confirm that algorithm produces correct results for all $n$ up to $10000$ .

Updated 11.06.18
The proposed calculator enumerates the prime numbers on the pass.
Let us construct the similar algorithm based on the ideas of Eratosthenes sieve. 
m = 1;
x = 2;
b = 2;
while (m < n)
{
  for(k = 3; ; k = k+2)
  {
    if(gcd(b,k)==1)
    {
       x = k;
       m = m + 1;
       b = b * x; 
    } 
  } 
}
return x;

In the both of the algorithms, a sequence of positive integers is tested for the presence of a common factor with a high composite number $b.$ If it equals to 1, then the integer is prime.
The algorithm above shows that it's sufficiently to use $b$ which equals the primorial $x\#$.
The OP calculator algorithm forms the greater value of $b,$ which contains any prime $p$ in the degree $d,$ wherein 
$$p^d\le x < p^{d+1},$$
but uses its delayed value. 
This means that the OP calculator can be improved. 
At this time, analysis of delaying influence shows that OP calculator is correct.
