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.

This page as a plain text file.
%I A104013 #14 Dec 21 2022 12:53:26
%S A104013 0,0,10,0,1100,10,100,0,111000,1100,1011101000,10,100111011000,100,
%T A104013 1000,0,11110000,111000,110101111001010000,1100,110000,1011101000,
%U A104013 10110010000,10,10100011110101110000,100111011000,100101111011010000
%N A104013 First digit-cycle of binary expansion of 1/n. Any initial 0's are to be placed at end of cycle.
%H A104013 Andrey Zabolotskiy, <a href="/A104013/b104013.txt">Table of n, a(n) for n = 1..1018</a>
%e A104013 1/5 = 0.00110011001100... in binary, so a(5) = 1100.
%t A104013 f[n_] := If[IntegerQ@ Log2@ n, 0, FromDigits[ RealDigits[1/n, 2][[1, 1]]]]; Array[f, 27] (* _Robert G. Wilson v_, Sep 01 2015 *)
%Y A104013 Cf. A007733, A036275, A104014.
%K A104013 base,nonn
%O A104013 1,3
%A A104013 Bryan Jacobs (bryanjj(AT)gmail.com), Feb 25 2005