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!)
A114206 See A114205. 3

%I #14 Nov 21 2017 19:46:20

%S 1,0,2,1,1,0,3,0,1,1,2,1,1,1,4,1,1,1,2,1,1,1,3,2,1,1,2,1,1,1,5,1,1,1,

%T 2,1,1,1,3,1,1,1,2,1,1,1,4,1,2,1,2,1,1,1,3,1,1,1,2,1,1,1,6,1,1,1,2,1,

%U 1,1,3,1,1,2,2,1,1,1,4,1,1,1,2,1,1,1,3,1,1,1,2,1,1,1,5,1,1,1,2

%N See A114205.

%H Hans Havermann, <a href="/A114206/b114206.txt">Table of n, a(n) for n = 2..10000</a>

%t fb[n_] := Block[{rd, o, p},rd = RealDigits[1/n];o = Last[rd];p = First[rd];If[ ! IntegerQ[Last[p]], p = Most[p]];Length[p] - o];Table[fb[n], {n, 120}] (* _Ray Chandler_, Oct 18 2006 *)

%t r[x_]:=RealDigits[1/x]; w[x_]:=First[r[x]]; f[x_]:=First[w[x]]; l[x_]:=Last[w[x]]; z[x_]:=Last[r[x]]; b[x_]:=Which[IntegerQ[l[x]], Length[w[x]]-1*z[x], IntegerQ[f[x]]==False, -1*z[x], True, Length[Drop[w[x],-1]]-1*z[x]]; (* _Hans Havermann_, Oct 18 2006 *)

%t Table[b[i], {i,2,128}]

%K nonn

%O 2,3

%A _N. J. A. Sloane_, Oct 17 2006

%E More terms from _Ray Chandler_ and _Hans Havermann_, Oct 18 2006

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 17:51 EDT 2024. Contains 371797 sequences. (Running on oeis4.)