%I #45 Oct 28 2023 05:45:18
%S 21,33,45,57,65,69,77,85,93,105,117,123,129,133,141,145,153,161,165,
%T 177,185,189,201,209,213,217,219,221,225,237,245,249,253,261,265,267,
%U 273,285,287,291,297,301,305,309,321,325,329,333,341,345,357
%N Odd orders n for which a complete dihedral Hamiltonian cycle system of the cocktail graph exists.
%H M. Buratti and F. Merola, <a href="http://dx.doi.org/10.1002/jcd.21311">Dihedral Hamiltonian cycle systems of the Cocktail Party Graph</a>, J. Combin. Des. 21 (1) (2013) 1-23, Section 3.
%p isA000961 := proc(n)
%p local pf;
%p if n = 1 then
%p return true;
%p end if;
%p pf := ifactors(n)[2] ;
%p if nops(pf) > 1 then
%p false;
%p else
%p true;
%p end if ;
%p end proc:
%p A023506 := proc(p)
%p padic[ordp](p-1,2) ;
%p end proc:
%p isA279229 := proc(n)
%p local ct2,p,l ;
%p if type(n,'even') then
%p false;
%p elif isA000961(n) then
%p false;
%p else
%p ct2 := 0 ;
%p for pf in ifactors(n)[2] do
%p l := A023506(op(1,pf)) ;
%p ct2 := ct2+l*op(2,pf) ;
%p end do:
%p type(ct2,'even') ;
%p end if;
%p end proc:
%p for n from 2 to 2000 do
%p if isA279229(n) then
%p printf("%d,",n);
%p end if;
%p end do:
%t A023506[p_] := IntegerExponent[p - 1, 2];
%t isA279229[n_] := Module[{ct2, l}, Which[EvenQ[n], False, PrimePowerQ[n], False, True, ct2 = 0; Do[l = A023506[pf[[1]]]; ct2 = ct2 + l*pf[[2]], {pf, FactorInteger[n]}]; EvenQ[ct2]]];
%t Select[Range[2, 400], isA279229] (* _Jean-François Alcover_, Oct 28 2023, after _R. J. Mathar_'s program *)
%K nonn,easy
%O 1,1
%A _R. J. Mathar_, Jan 04 2017