cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A279229 Odd orders n for which a complete dihedral Hamiltonian cycle system of the cocktail graph exists.

Original entry on oeis.org

21, 33, 45, 57, 65, 69, 77, 85, 93, 105, 117, 123, 129, 133, 141, 145, 153, 161, 165, 177, 185, 189, 201, 209, 213, 217, 219, 221, 225, 237, 245, 249, 253, 261, 265, 267, 273, 285, 287, 291, 297, 301, 305, 309, 321, 325, 329, 333, 341, 345, 357
Offset: 1

Views

Author

R. J. Mathar, Jan 04 2017

Keywords

Programs

  • Maple
    isA000961 := proc(n)
        local pf;
        if n = 1 then
            return true;
        end if;
        pf := ifactors(n)[2] ;
        if nops(pf) > 1 then
            false;
        else
            true;
        end if ;
    end proc:
    A023506 := proc(p)
        padic[ordp](p-1,2) ;
    end proc:
    isA279229 := proc(n)
        local ct2,p,l ;
        if type(n,'even') then
            false;
        elif isA000961(n) then
            false;
        else
            ct2 := 0 ;
            for pf in ifactors(n)[2] do
                l := A023506(op(1,pf)) ;
                ct2 := ct2+l*op(2,pf) ;
            end do:
            type(ct2,'even') ;
        end if;
    end proc:
    for n from 2 to 2000 do
        if isA279229(n) then
            printf("%d,",n);
        end if;
    end do:
  • Mathematica
    A023506[p_] := IntegerExponent[p - 1, 2];
    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]]];
    Select[Range[2, 400], isA279229] (* Jean-François Alcover, Oct 28 2023, after R. J. Mathar's program *)