login
Primes p, not safe primes, such that the smallest factor of (2^(p-1)-1) / 3 is equal to p.
0

%I #23 Jul 02 2023 02:24:04

%S 443,647,1847,2243,2687,2699,6263,6563,7487,7583,8627,8663,9419,9767,

%T 10223,11867,12323,13187,13907,14627,14723,14783,17747,17783,19739,

%U 20639,20807,21863,22307,23747,24107,24923,25127,26759,27983,29207,29819,30839,31247,32303,34403,34439

%N Primes p, not safe primes, such that the smallest factor of (2^(p-1)-1) / 3 is equal to p.

%e 443 is the first term since p = 443 is the first term of A359387 that is not in A005385 (i.e., (443-1)/2 = 13*17 is not prime).

%e 647 is the second term since p = 647 is the first term (> 443) of A359387 that is not in A005385 (i.e., (647-1)/2 = 17*19 is not prime).

%t q[p_] := ! PrimeQ[(p - 1)/2] && AllTrue[Range[p], ! PrimeQ[#] || PowerMod[2, p - 1, 3*p*#] > 1 &]; Select[Prime[Range[4, 4000]], q] (* _Amiram Eldar_, Mar 01 2023 *)

%o (PARI) forprime(p=11, 40000, if(!isprime((p-1)/2), forprime(div=5, p-1, if(Mod(2, div)^(p-1)==1, next(2))); print1(p, ", ")))

%Y Equals A359387 \ A005385.

%K nonn

%O 1,1

%A _Alain Rocchelli_, Feb 22 2023