OFFSET
1,1
COMMENTS
Conjecture: The prime nondivisors p and q are elements of the reduced residue system consisting of the totatives of k. Assume a triple (k,p,q) which satisfies the definition. If P and Q are the two subgroups generated by p and q respectively and p < q then P >= Q.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
For k = 20 and p, q = (3,7), p^i*q^j mod k can only take on the values 1, 3, 7, 9 which, other than 1, are all divisible by 3 or 7, so 20 is a term.
PROG
(PARI) for(k=1, 364, test2=0; forprime(p=2, k-1, forprime(q=p+1, k-2, if(gcd(p, k)==1 && gcd(q, k)==1, test=0; for(i=0, eulerphi(k), for(j=0, eulerphi(k), if(p^i*q^j % k >1 && gcd(p^i*q^j % k, p)==1 && gcd(p^i*q^j % k, q)==1, test=1; ); if(test==1, break(2); ); ); ); if(test==0, test2=1; ); ); ); ); if(test2==1, print1(k, ", "); ); );
(Python)
from itertools import count, combinations, product, islice
from sympy import primefactors, primerange, reduced_totient
def A351899_gen(startvalue=1): # generator of terms >= startvalue
for k in count(max(startvalue, 1)):
f, t = set(primefactors(k)), reduced_totient(k)
plist = [p for p in primerange(k) if p not in f]
for p, q in combinations(plist, 2):
for i, j in product(range(t+1), repeat=2):
r = pow(p, i, k)*pow(q, j, k)%k
if r !=1 and r%p and r%q:
break
else:
yield k
break
CROSSREFS
KEYWORD
nonn
AUTHOR
Craig J. Beisel, Feb 24 2022
EXTENSIONS
Duplicate term 234 removed by Chai Wah Wu, Feb 23 2026
STATUS
approved
