login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A121016
Numbers whose binary expansion is properly periodic.
30
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,1
COMMENTS
A finite sequence is aperiodic if its cyclic rotations are all different. - Gus Wiseman, Oct 31 2019
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
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)
MATHEMATICA
PeriodicQ[n_, base_] := Block[{l = IntegerDigits[n, base]}, MemberQ[ RotateLeft[l, # ] & /@ Most@ Divisors@ Length@l, l]]; Select[ Range@2599, PeriodicQ[ #, 2] &]
PROG
(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
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.
Sequence in context: A373186 A281642 A353427 * A246701 A151733 A088636
KEYWORD
base,easy,nonn
AUTHOR
Jacob A. Siehler, Sep 08 2006
STATUS
approved