OFFSET
1,1
COMMENTS
When m = 2*p, p odd prime, abelian group is C_{2*p} and nonabelian group is D_{2*p} ~ C_p : C_2.
When m = p*q, p<q odd primes with p dividing q-1, abelian group is C_{p*q} and nonabelian group is C_q : C_p.
In both cases, C, D mean cyclic, dihedral groups of the stated order; the symbols ~ and : mean isomorphic to and semidirect product respectively.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
There is only one group of order 1, 2, 3, 5 and the two groups of order 4 are abelian; hence 6 is the smallest term because the two groups of order 6 are the abelian and cyclic group C_6, while the nonabelian group is the symmetric group S_3 isomorphic to dihedral group D_6.
The smallest odd term is 21, the two corresponding groups are C_21 and semi-direct product C_7 : C_3.
The smallest term of the form p*q*r, p < q < r primes, is 105, the two corresponding groups are C_105 and semi-direct product C_35 : C_3.
PROG
(PARI) is(n, f=factor(n))=my(p=f[, 1], s); if(#p && vecmax(f[, 2])>1, return(0)); for(i=2, #p, for(j=1, i-1, if(p[i]%p[j]==1 && s++>1, return(0)))); s==1 \\ Charles R Greathouse IV, Jan 08 2022
(PARI) list(lim)=my(v=List()); forsquarefree(n=6, lim\1, my(p=n[2][, 1], s); for(i=2, #p, for(j=1, i-1, if(p[i]%p[j]==1 && s++>1, next(3)))); if(s==1, listput(v, n[1]))); Vec(v) \\ Charles R Greathouse IV, Jan 08 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Jan 07 2022
EXTENSIONS
More terms from Jinyuan Wang, Jan 08 2022
STATUS
approved