%I #21 Jul 03 2018 18:35:31
%S 7,11,13,17,19,23,31,41,43,47,53,59,61,73,83,89,103,107,109,131,139,
%T 151,163,167,173,179,181,193,199,223,227,229,241,251,263,269,271,283,
%U 293,311,313,347,349,353,359,383,389,419,421,431,433,439,443,463,467,479,499,503,509,521,523,557,563,571,587,593,599
%N Primes p > 5 such that no polygonal number P_s(k) (with s >= 3, k >= 5 ) is equal to p  1.
%C 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.
%C Set of primes without {A304688} and {2,3,5}.
%H OEIS, <a href="http://oeis.org/wiki/Polygonal_numbers#Nontrivial_polygonal_numbers">Nontrivial polygonal numbers</a>
%t lst = {}; Do[
%t If[! Resolve[
%t Exists[{s, k},
%t Prime[m] == 1/2 k (4 + k (2 + s)  s) + 1 && s >= 3 && k >= 5],
%t Integers], lst = Union[lst, {Prime[m]}]], {m, 4, 150}]; lst
%Y Cf. A000040, A304688.
%K nonn
%O 1,1
%A _Ralf Steiner_, May 17 2018
