OFFSET
1,1
COMMENTS
For all primes p > 5, at least one polygonal number exists with P_s(k) = p - 1 when k = 3 or 4, dependent on p mod 6; this is why the sequence is defined for k >= 5.
Set of primes without {A304688} and {2,3,5}.
MATHEMATICA
lst = {}; Do[
If[! Resolve[
Exists[{s, k},
Prime[m] == 1/2 k (4 + k (-2 + s) - s) + 1 && s >= 3 && k >= 5],
Integers], lst = Union[lst, {Prime[m]}]], {m, 4, 150}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Steiner, May 17 2018
STATUS
approved