login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300654 a(n) is the greatest k such that, for i = 1..k, the binary representation of i appears as a substring in the binary representation of 1/n (ignoring the radix point and adding trailing zeros if necessary in case of a terminating expansion). 2
2, 2, 2, 2, 4, 2, 2, 2, 4, 4, 8, 2, 9, 2, 2, 2, 4, 4, 16, 4, 4, 8, 6, 2, 8, 9, 11, 2, 20, 2, 2, 2, 4, 4, 8, 4, 32, 16, 6, 4, 4, 4, 8, 8, 6, 6, 12, 2, 12, 8, 2, 9, 33, 11, 10, 2, 8, 20, 37, 2, 41, 2, 2, 2, 4, 4, 64, 4, 14, 8, 14, 4, 4, 32, 11, 16, 17, 6, 22, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Equivalently, a(n) is the greatest k such that A300653(n, k) = k.
This sequence has similarities with A144016: here we consider the binary expansion of 1/n, there the binary expansion of n.
LINKS
FORMULA
a(2*n) = a(n).
a(n) = 2 iff n belongs to A300630.
EXAMPLE
For n = 19:
- the binary expansion of 1/19 is 0.0000(110101111001010000) (with repeating digits in parentheses),
- the first occurrence of the binary representation of k for k = 1..16 is:
k bin(k) bin(1/19) with bin(k) in parentheses
-- ------ ------------------------------------
1 1 0.0000(1)101...
2 10 0.00001(10)101...
3 11 0.0000(11)010...
4 100 0.000011010111(100)101...
5 101 0.00001(101)011...
6 110 0.0000(110)101...
7 111 0.000011010(111)100...
8 1000 0.00001101011110010(1000)011...
9 1001 0.000011010111(1001)010...
10 1010 0.00001(1010)111...
11 1011 0.0000110(1011)110...
12 1100 0.00001101011(1100)101...
13 1101 0.0000(1101)011...
14 1110 0.0000110101(1110)010...
15 1111 0.000011010(1111)001...
16 10000 0.00001101011110010(10000)110...
- the binary representation of 17 (10001) is missing,
- hence a(19) = 16.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A277561 A317684 A127973 * A023157 A228849 A359541
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 10 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)