login
Primes p > 5 such that there is a polygonal number P_s(k) (with s >= 3, k >= 5) equal to p-1.
1

%I #43 Jul 31 2018 22:47:04

%S 29,37,67,71,79,97,101,113,127,137,149,157,191,197,211,233,239,257,

%T 277,281,307,317,331,337,367,373,379,397,401,409,449,457,461,487,491,

%U 541,547,569,577,607,617,631,641,653,659,673,677,701,709,727,739,743,751,757,787,821,827,853,857

%N Primes p > 5 such that there is a polygonal number P_s(k) (with s >= 3, k >= 5) 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 For s = {14,17} no such P_s(k) exists, since P_14(k) + 1 and P_17(k) + 1 are composites.

%C For k = 4*m + 1, m > 0 all the numbers P_s(k) + 1 are even and > 2, so they cannot be prime.

%C For s = 2*m, m >= 2, k = 2*j + 1, j >= 1 all the numbers P_s(k) + 1 are even and > 2, so they cannot be prime.

%H OEIS, <a href="http://oeis.org/wiki/Polygonal_numbers#Nontrivial_polygonal_numbers">Nontrivial polygonal numbers</a>

%e a(1)-1 = 29-1 = 28 = P_3(7);

%e a(2)-1 = 37-1 = 36 = P_3(8) = P_4(6).

%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

%o (PARI) isok(p) = {if ((p > 5) && isprime(p), for (s=3, p, if (ispolygonal(p-1, s, &k) && (k>=5), return (1)););); return (0);} \\ _Michel Marcus_, May 18 2018

%Y Cf. A000040 (primes), A304690.

%K nonn

%O 1,1

%A _Ralf Steiner_, May 17 2018