login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175844 Parse the base-2 expansion of 1/n using the Ziv-Lempel encoding as described in A106182; sequence gives the eventual period of the differences of the sequence of lengths of the successive phrases. 0
1, 1, 4, 1, 16, 4, 9, 1, 36, 16, 100, 4, 144, 9, 16, 1, 64, 36, 324, 16, 36, 100, 121, 4, 400, 144, 324, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

The Ziv-Lempel encoding scans the sequence from left to right and inserts a comma when the current phrase (since the last comma) is distinct from all previous phrases (between commas).

It appears that a(n) is just the square of the period of the base 2 expansion of 1/n. For example, if n=3 the sequence of terms in the base-2 expansion of 1/3 is {0,1,0,1,0,1,0,1,...}, of period 2, whereas a(3)=4=2^2.

LINKS

Table of n, a(n) for n=1..28.

EXAMPLE

For n=3, the sequence of base-2 digits of 1/3 is {0,1,0,1,0,1,0,1,0,1,0,1,...}. The Ziv-Lempel encoding parses this into "phrases": {0}, {1}, {0,1}, {0,1,0}, {1,0}, {1,0,1}, {0,1,0,1}, {0,1,0,1,0}, {1,0,1,0}, {1,0,1,0,1}, {0,1,0,1,0,1}, ..., with lengths {1,1,2,3,2,3,4,5,4,5,6,7,6,7,8,9,8,9,10,11,...}. The differences are {0,1,1,-1,1,1,1,-1,1,1,1,-1,1,...} which quickly becomes periodic with period 4. Thus a(3)=4.

CROSSREFS

Cf. A106182, A109337.

Sequence in context: A062780 A262616 A309074 * A167343 A094361 A187926

Adjacent sequences:  A175841 A175842 A175843 * A175845 A175846 A175847

KEYWORD

nonn

AUTHOR

John W. Layman, Sep 24 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 23 21:20 EST 2020. Contains 332195 sequences. (Running on oeis4.)