%I #14 Mar 07 2020 12:25:58
%S 2,3,5,13,17,19,37,73,97,101,109,151,163,181,193,197,211,241,251,257,
%T 271,281,337,379,397,401,421,433,449,487,491,541,577,601,631,641,661,
%U 673,701,727,751,757,769,811,881,883,991,1009
%N Primes p such that for all primes q dividing p-1 every residue mod p is the sum of two q-th powers mod p.
%C Alternative definition: increasing list of primes p such that for ALL primes q, every residue mod p is the sum of two q-th powers mod p (if q does not divides p-1 then every residue mod p is a q-th power, so only the case q divides p-1 is not trivial).
%C Related to the conjecture:
%C For every prime q there are only finitely many primes p such that not every residue mod p is the sum of two q-th powers mod p.
%H Charles R Greathouse IV, <a href="/A236183/b236183.txt">Table of n, a(n) for n = 1..400</a>
%e p=7 is not in the list because q=3 divides p-1 and the only residues mod 7 which are the sum of two cubic residues mod 7 are: 0,1,-1,2,-2.
%e To check that p=13 is in the sequence, since 2 and 3 are the only primes dividing p-1=12, we only need to see that every residue mod 13 is both the sum of two quadratic residues mod 13 and the sum of two cubic residues mod 13.
%o (Sage)
%o for p in prime_range(a,b):
%o c=1
%o C=GF(p)
%o u=combinations_with_replacement(C,2)
%o v=[x for x in u]
%o for q in prime_divisors(p-1):
%o w=(k[0]^q+k[1]^q for k in v)
%o s=set(w)
%o l=len(s)
%o if l!=p:
%o c=0
%o break
%o if c==1:
%o print(p)
%o (PARI) is(p)=if(!isprime(p),return(0)); my(f=factor(p-1)[,1],v,u); for(i=1, #f, u=vector(p); v=vector(p,j,j^f[i]%p); for(j=1,p,for(k=j,p,u[(v[j]+v[k])%p+1]=1)); if(!vecmin(u),return(0))); 1 \\ _Charles R Greathouse IV_, Jan 23 2014
%K nonn
%O 1,1
%A _Esteban Arreaga Ambéliz_, Jan 19 2014