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.

A053006 Numbers m for which there exist d(1),...,d(m), each in {0,1}, such that Sum_{i=1..m-k} d(i)*d(i+k) is odd for all k=0,...,m-1.

Original entry on oeis.org

1, 4, 12, 16, 24, 25, 36, 37, 40, 45, 52, 64, 76, 81, 84, 96, 100, 109, 112, 117, 120, 132, 136, 156, 165, 169, 172, 180, 184, 192, 216, 220, 232, 240, 244, 249, 252, 256, 265, 277, 300, 301, 304, 312, 316, 324, 357, 360, 361, 364, 372, 376, 412, 420, 432
Offset: 1

Views

Author

Keywords

Comments

m is in the sequence if and only if the multiplicative order of 2 (mod 2m-1) is odd.

References

  • R. K. Guy, Unsolved Problems in Number Theory, E38.

Crossrefs

Programs

  • Mathematica
    o2[ m_ ] := Module[ {e, t}, For[ e = 1; t = 2, Mod[ t-1, m ] >0, e++, t = Mod[ 2t, m ] ]; e ]; Select[ Range[ 1, 500 ], OddQ[ o2[ 2#-1 ] ] & ]
    (* Second program: *)
    (Select[Range[1, 999, 2], OddQ[MultiplicativeOrder[2, #]]&] + 1)/2 (* Jean-François Alcover, Dec 20 2017 *)
  • PARI
    is(n)=znorder(Mod(2,2*n-1))%2 \\ Charles R Greathouse IV, Jun 24 2015
    
  • PARI
    A000265(n)=n>>valuation(n,2)
    is(n)=Mod(2,2*n-1)^A000265(eulerphi(2*n-1))==1 \\ Charles R Greathouse IV, Jun 24 2015
    
  • Python
    from sympy import n_order
    def A053006_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n_order(2,(n<<1)-1)&1,count(max(startvalue,1)))
    A053006_list = list(islice(A053006_gen(),20)) # Chai Wah Wu, Feb 07 2023

Formula

a(n) = (A036259(n) + 1)/2.

Extensions

More terms from John W. Layman, Feb 21 2000
Additional information from Dean Hickerson, May 25 2001