%I #11 Aug 17 2022 22:42:20
%S 30,429,3644,4612,14357,31545,40933,49414,104071,149689,149689,149689,
%T 149689,165326,325852,325852,415069,415069,491237,566214
%N Greatest k for which the Andrica-like conjectural inequalities, prime(k+1)-prime(k)-(1/n)*sqrt(prime(k)) < 0, appear to fail, based on empirical evidence.
%C This is a family of increasingly restrictive Andrica-like conjectures that all imply Legendre's conjecture.
%e For n = 1, one needs k > 30 for the inequality to hold, and it is conjectured that it holds for all k > 30. In words, the first such inequality says that we expect to see a new prime prime(k+1) between prime(k) and prime(k)+sqrt(prime(k)) for k>30.
%t Block[{nn = 1500000, p, q}, Array[Set[p[#], Prime[#]] &, nn + 1]; Array[Set[q[#], (p[# + 1] - p[#])^2] &, nn]; TakeWhile[Monitor[Table[nn - LengthWhile[Table[# q[k] < p[k], {k, nn, 1, -1}], # &] &[n^2], {n, 24}], {n, k}], # < nn/2 &]] (* _Michael De Vlieger_, Aug 17 2022 *)
%o (PARI) lista(nn) = my(N=10^7, vp=primes(N), va=vector(nn)); for (n=1, nn, my(v = v=vector(N-1, k, n^2*(vp[k+1]-vp[k])^2 < vp[k])); forstep(k=N-1, 1, -1, if (!v[k], va[n] = k; break));); va; \\ _Michel Marcus_, Aug 17 2022
%Y Cf. A084976.
%K nonn,hard,more
%O 1,1
%A _Daniel Tisdale_, Jun 15 2009
%E a(2) corrected, name edited and more terms from _Michel Marcus_, Aug 17 2022