login
Primes prime(k) such that A338820(k) is prime.
3

%I #12 Feb 06 2021 22:00:35

%S 23,53,73,139,277,281,283,307,313,347,359,383,449,571,733,751,947,

%T 1013,1049,1129,1151,1259,1381,1559,1621,1693,1973,2087,2089,2111,

%U 2251,2477,2539,2579,2593,2693,2801,2803,2917,3001,3121,3217,3373,3511,3617,3797,4013,4261,4463,4549,4567,4639,4643

%N Primes prime(k) such that A338820(k) is prime.

%C Primes p such that the sum of (q^2 mod p) for primes q < p is prime.

%H Robert Israel, <a href="/A338821/b338821.txt">Table of n, a(n) for n = 1..3700</a>

%e a(3) = 73 because it is prime and (2^2 mod 73) + (3^2 mod 73) + (5^2 mod 73) + ... + (71^2 mod 73) = 661 is prime. 73 = prime(21) where A338820(21) = 661, and this is the third prime value in A338820.

%p N:= 1000: # for terms in the first N primes

%p P:= [seq(ithprime(i),i=1..N)]:

%p R:= NULL:

%p for n from 1 to N do

%p v:= add(P[i]^2 mod P[n],i=1..n-1);

%p if isprime(v) then R:= R, P[n] fi

%p od:

%p R;

%Y Cf. A338102, A338820.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Nov 10 2020