A316568 Largest k such that 1^2 + n, 2^2 + n, ..., k^2 + n are composite.
0, 0, 1, 0, 5, 0, 1, 2, 1, 0, 5, 0, 1, 2, 1, 0, 5, 0, 1, 2, 3, 0, 5, 6, 1, 8, 1, 0, 11, 0, 3, 2, 1, 2, 5, 0, 1, 2, 1, 0, 23, 0, 1, 2, 3, 0, 5, 4, 1, 2, 3, 0, 5, 4, 1, 8, 1, 0, 17, 0, 5, 2, 1, 2, 5, 0, 1, 8, 1, 0, 5, 0, 3, 2, 1, 4, 5, 0, 1, 2, 3, 0, 11, 4, 1, 8, 3, 0, 11, 6, 3, 2, 1, 2, 5, 0, 1, 2, 1, 0
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A085099.
Programs
-
Mathematica
lk[n_]:=Module[{k=1},While[CompositeQ[k^2+n],k++];k-1]; Array[lk,100] (* Harvey P. Dale, Aug 04 2022 *)
Formula
a(n) = A085099(n) - 1.