login
Odd primes p that are not congruent to 2*k modulo prime(k+1) for any positive integer k.
0

%I #24 Feb 08 2023 00:00:28

%S 3,7,31,37,43,61,67,73,157,211,271,277,331,367,421,457,571,691,823,

%T 883,997,1093,1201,1237,1303,1657,1783,2053,2287,2347,2371,2377,2557,

%U 2803,2971,3001,3061,3067,3307,3313,3391,3967,4021,4231,4273,4357,4447,4561,4603

%N Odd primes p that are not congruent to 2*k modulo prime(k+1) for any positive integer k.

%C This sequence arises from a more general study. First, consider a function f : P -> N (where P is the set of the odd prime numbers) such that 0 <= f(p) < p. Then, remove from the set P each prime number q such that q = f(p) (mod p) for some p.

%C For example, if f(p) = 0 for each p, then the final set is the empty set.

%C If f(p) = 1 for each p, then the final set seems to be the set of Fermat primes (empirical observation).

%C If f(p) = p-1, then the final set seems to be the set of Mersenne primes (empirical observation).

%C For the particular choice f(p) = 2k (where p is the k-th odd prime) this sequence is obtained.

%H Mathematics StackExchange, <a href="https://math.stackexchange.com/questions/4615463/can-the-set-of-odd-primes-be-finitely-sieved-by-arbitrary-congruences-of-primes">Can the set of odd primes be finitely sieved by arbitrary congruences of primes?</a>

%e Terms in this sequence are those odd primes that are neither congruent to 2 (mod 3), nor congruent to 4 (mod 5), nor congruent to 6 (mod 7), nor congruent to 8 (mod 11), etc.

%e 7 is a term because 7 == 1 (mod 3) and 7 == 2 (mod 5).

%e 11 is not a term because 11 == 2 (mod 3).

%e 13 is not a term because 13 == 6 (mod 7).

%e 17 is not a term because 17 == 2 (mod 3).

%e 19 is not a term because 19 == 8 (mod 11).

%o (PARI) isok(p) = {if(!isprime(p)||p==2, 0, my(k=0); forprime(q=3, p-1, k+=2; if(p%q==k, return(0))); 1) } \\ _Andrew Howroyd_, Jan 11 2023

%Y Cf. A019434, A000668.

%K nonn

%O 1,1

%A _Andrea La Rosa_, Jan 11 2023

%E Terms a(15) and beyond from _Andrew Howroyd_, Jan 11 2023