login
Least integer k > 0 such that prime(k) - k*n is a square.
2

%I #26 Apr 23 2020 12:12:12

%S 1,1,12,35,75,181,490,1061,2707,6459,15932,40127,100362,251711,637236,

%T 1617181,4124444,10553419,27066987,69709706,179992917,465769804,

%U 1208198534,3140421726,8179002096,21338685437,55762149044,145935689364,382465573484,1003652347334

%N Least integer k > 0 such that prime(k) - k*n is a square.

%C Conjecture: a(n) exists for any n > 0.

%C See also A247278 for a related conjecture.

%H Giovanni Resta, <a href="/A247893/b247893.txt">Table of n, a(n) for n = 1..50</a>

%H Zhi-Wei Sun, <a href="http://dx.doi.org/doi:10.1007/s11139-015-9702-z">A new theorem on the prime-counting function</a>, Ramanujan J. 42 (2017), no.1, 59-67. (Cf. Conjecture 4.1.)

%e a(3) = 12 with prime(12) - 12*3 = 37 - 36 = 1^2.

%e a(21) = 179992917 with prime(179992917) - 179992917*21 = 3779851261 - 179992917*21 = 2^2.

%e a(22) = 465769804 with prime(465769804) - 465769804*22 = 10246935737 - 465769804*22 = 7^2.

%t SQ[n_]:=IntegerQ[Sqrt[n]]

%t Do[k=1;Label[aa];If[SQ[Prime[k]-k*n],Print[n," ",k];Goto[bb]];k=k+1;Goto[aa];Label[bb];Continue,{n,1,18}]

%t lik[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[Prime[k]-k*n]],k++];k]; Array[lik,20] (* _Harvey P. Dale_, May 11 2019 *)

%Y Cf. A000040, A000290, A247278, A247895.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, Sep 27 2014

%E a(21)-a(22) from _Zhi-Wei Sun_, Apr 21 2020

%E Terms a(23) and beyond from _Giovanni Resta_, Apr 22 2020