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.

A104013 First digit-cycle of binary expansion of 1/n. Any initial 0's are to be placed at end of cycle.

Original entry on oeis.org

0, 0, 10, 0, 1100, 10, 100, 0, 111000, 1100, 1011101000, 10, 100111011000, 100, 1000, 0, 11110000, 111000, 110101111001010000, 1100, 110000, 1011101000, 10110010000, 10, 10100011110101110000, 100111011000, 100101111011010000
Offset: 1

Views

Author

Bryan Jacobs (bryanjj(AT)gmail.com), Feb 25 2005

Keywords

Examples

			1/5 = 0.00110011001100... in binary, so a(5) = 1100.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[IntegerQ@ Log2@ n, 0, FromDigits[ RealDigits[1/n, 2][[1, 1]]]]; Array[f, 27] (* Robert G. Wilson v, Sep 01 2015 *)