%I #26 Feb 17 2019 20:47:35
%S 1,2,3,4,5,6,8,10,12,15,16,20,21,24,28,40,48,56,60,72,88,120,168,240,
%T 840
%N Numbers k such that all coprime quadratic residues modulo k are squares.
%C Numbers k such that A046073(k) = A057828(k).
%C There are exactly 25 members in this sequence and this is the full list. Note that for other k, A046073(k) > A057828(k).
%C From _Jianing Song_, Feb 14 2019: (Start)
%C For the proof that this sequence is finite, we will show that there are no terms > 130729.
%C Let A(n) = A046073(n) be the number of coprime quadratic residues modulo n. By definition, if k is a term then A(k) <= sqrt(k), that is, A(k)/sqrt(k) <= 1. Let f(n) = A(n)/sqrt(n), then f(n) is multiplicative with f(2) = sqrt(2)/2, f(4) = 1/2, f(2^e) = 2^(e/2 - 3) for e >= 3, f(p^e) = ((p - 1)/2)*p^(e/2 - 1) when p > 2. Note that f(2^e) >= a(2^3), f(p^e) >= f(p), f(p) > 1 when p >= 7. For every number n, we have:
%C a) if n is divisible by a prime >= 127, then f(n) >= f(2^3)*f(3)*f(5)*f(127) = sqrt(1323/1270) > 1.
%C b) if n is divisible by two distinct primes >= 23, then f(n) >= f(2^3)*f(3)*f(5)*f(23)*f(29) = sqrt(11858/10005) > 1.
%C So if k > 130729 is a term, then all prime factors of k are no greater than 113, and k contains at most one prime factor >= 23. On the other hand, if all prime factors of k are no greater than 19, then 53881 is a coprime quadratic residue modulo k because 53881 is a coprime quadratic residue modulo 2^3, 3, 5, 7, 11, 13, 17 and 19, but 53881 is not a perfect square, a contradiction. As a result, k must contain exactly one prime factor p in [23, 113].
%C Now if a number m is a coprime quadratic residue modulo 2^3, 3, 5, 7, 11, 13, 17, 19 and p, then m is a coprime quadratic residue modulo k. Consider the numbers 53881, 86641, 87481, 102001, 117049 and 130729. At least one of them is a coprime quadratic residue modulo each prime p in [23, 113], so at least one of them is a coprime quadratic residue modulo k, but none of them is a square, a contradiction! (End)
%e All coprime quadratic residues modulo 21 are 1, 4, 16 and they are all squares, so 21 is a term.
%e All coprime quadratic residues modulo 840 are 1, 121, 169, 289, 361, 529 and they are all squares, so 840 is a term.
%e 249 == 23^2 is a coprime quadratic residue modulo 280 but 249 is not a square number, so 280 is not a term.
%o (PARI) for(k=1, 130729, if(eulerphi(k)/2^#znstar(k)[2]<=sqrt(k), for(j=1, k, if(gcd(j,k)==1&&!issquare(j^2%k), break()); if(j==k, print1(k, ", "))))) \\ _Jianing Song_, Feb 15 2019
%Y Cf. A046073, A057828, A214583.
%Y A254328 is a subsequence.
%K nonn,fini,full
%O 1,2
%A _Jianing Song_, Apr 29 2018
|