STATUS
editing
approved
editing
approved
Least integer k > 0 such that k * n - prime(k) is a square.
proposed
editing
editing
proposed
Note that k * n - prime(k) < 0 if k > e^(n + 1).
reviewed
editing
proposed
reviewed
editing
proposed
Least integer k > 0 such that k * n - prime(k) is a square.
Note that k * n - prime(k) < 0 if k > e^(n + 1).
a(5) = 29 since 29 * 5 - prime(29) = 145 - 109 = 6^2.
SQ[n_] := IntegerQ[Sqrt[n]]
Do[k = 1; Label[aa]; If[SQ[k * n - Prime[k]], Print[n, " ", k]; Goto[bb]]; k = k + 1; Goto[aa]; Label[bb]; Continue, {n, 2, 60}]
proposed
editing
editing
proposed