login
A316568
Largest k such that 1^2 + n, 2^2 + n, ..., k^2 + n are composite.
1
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,5
LINKS
FORMULA
a(n) = A085099(n) - 1.
MATHEMATICA
lk[n_]:=Module[{k=1}, While[CompositeQ[k^2+n], k++]; k-1]; Array[lk, 100] (* Harvey P. Dale, Aug 04 2022 *)
CROSSREFS
Cf. A085099.
Sequence in context: A200653 A371940 A058064 * A198927 A198100 A104112
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 06 2018
STATUS
approved