%I #10 Dec 05 2020 04:09:11
%S 5,29,197,317,509,797,1373,1949,2213,2909,3557,3677,4157,4229,4253,
%T 4349,5309,5573,5693,6173,6269,6653,7517,7589,8573,8837,9533,10589,
%U 11069,11549,14813,15749,15773,17573,17669,17789,18077,18269,19037,19997,20357
%N Primes p of the form 8*k + 5 such that every odd prime divisor of p-1 has the form 8*t + 7.
%D L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 476.
%H Amiram Eldar, <a href="/A306932/b306932.txt">Table of n, a(n) for n = 1..10000</a>
%p with(numtheory);
%p s:=[];
%p for n from 2 to 5000 do
%p p:=ithprime(n); p2:=((p+16) mod 8);
%p if (p2=5) then sw:=1;
%p for q in factorset(p-1) do if ( (q mod 2)=1) and (q mod 8) <> 7 then sw:=-1; break; fi; od:
%p if sw=1 then s:=[op(s),p]; fi;
%p fi;
%p od:
%p s; # A306932
%t Select[8*Range[0, 2500] + 5, PrimeQ[#] && AllTrue[FactorInteger[# - 1][[;; , 1]], #1 == 2 || Mod[#1, 8] == 7 &] &] (* _Amiram Eldar_, Dec 05 2020 *)
%Y Cf. A306930, A306931.
%K nonn
%O 1,1
%A _N. J. A. Sloane_, Mar 16 2019
|