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.

A121016 Numbers whose binary expansion is properly periodic.

Original entry on oeis.org

3, 7, 10, 15, 31, 36, 42, 45, 54, 63, 127, 136, 153, 170, 187, 204, 221, 238, 255, 292, 365, 438, 511, 528, 561, 594, 627, 660, 682, 693, 726, 759, 792, 825, 858, 891, 924, 957, 990, 1023, 2047, 2080, 2145, 2184, 2210, 2275, 2340, 2405, 2457, 2470, 2535
Offset: 1

Views

Author

Jacob A. Siehler, Sep 08 2006

Keywords

Comments

A finite sequence is aperiodic if its cyclic rotations are all different. - Gus Wiseman, Oct 31 2019

Examples

			For example, 204=(1100 1100)_2 and 292=(100 100 100)_2 belong to the sequence, but 30=(11110)_2 cannot be split into repeating periods.
From _Gus Wiseman_, Oct 31 2019: (Start)
The sequence of terms together with their binary expansions and binary indices begins:
   3:         11 ~ {1,2}
   7:        111 ~ {1,2,3}
   10:      1010 ~ {2,4}
   15:      1111 ~ {1,2,3,4}
   31:     11111 ~ {1,2,3,4,5}
   36:    100100 ~ {3,6}
   42:    101010 ~ {2,4,6}
   45:    101101 ~ {1,3,4,6}
   54:    110110 ~ {2,3,5,6}
   63:    111111 ~ {1,2,3,4,5,6}
  127:   1111111 ~ {1,2,3,4,5,6,7}
  136:  10001000 ~ {4,8}
  153:  10011001 ~ {1,4,5,8}
  170:  10101010 ~ {2,4,6,8}
  187:  10111011 ~ {1,2,4,5,6,8}
  204:  11001100 ~ {3,4,7,8}
  221:  11011101 ~ {1,3,4,5,7,8}
  238:  11101110 ~ {2,3,4,6,7,8}
  255:  11111111 ~ {1,2,3,4,5,6,7,8}
  292: 100100100 ~ {3,6,9}
(End)
		

Crossrefs

A020330 is a subsequence.
Numbers whose binary expansion is aperiodic are A328594.
Numbers whose reversed binary expansion is Lyndon are A328596.
Numbers whose binary indices have equal run-lengths are A164707.

Programs

  • Mathematica
    PeriodicQ[n_, base_] := Block[{l = IntegerDigits[n, base]}, MemberQ[ RotateLeft[l, # ] & /@ Most@ Divisors@ Length@l, l]]; Select[ Range@2599, PeriodicQ[ #, 2] &]
  • PARI
    is(n)=n=binary(n);fordiv(#n,d,for(i=1,#n/d-1, for(j=1,d, if(n[j]!=n[j+i*d], next(3)))); return(d<#n)) \\ Charles R Greathouse IV, Dec 10 2013