%I #6 Nov 11 2024 22:26:20
%S 3,5,7,17,19,22,23,29,31,33,37,43,47,53,55,71,85,87,89,91,102,103,105,
%T 106,109,111,112,113,115,116,117,122,123,133,139,141,143,145,149,153,
%U 155,157,162,163,167,175,177,191,193,199,201,203,209,211,221,223,233,239,241,243,245,247,249,253
%N Nonsquares k such that A377938(k) is not a prime.
%C Numbers k such that k is a primitive root modulo some nonprime x > k but not modulo any prime between k and x.
%C Numbers k such that 0 < A377938(k) < A023049(k).
%H Robert Israel, <a href="/A377939/b377939.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3) = 7 is a term because 7 is a primitive root mod 10, while the least prime > 7 for which 7 is a primitive root is 11.
%p filter:= proc(n) local k;
%p if issqr(n) then return false fi;
%p for k from n+1 do
%p if igcd(k,n) = 1 and numtheory:-order(n,k) = numtheory:-phi(k) then return not isprime(k) fi
%p od
%p end proc:
%p select(filter, [$2..1000]);
%Y Cf. A023049, A377938.
%K nonn
%O 1,1
%A _Robert Israel_, Nov 11 2024