From: Holger Mack Date: 2008-09-21T05:27:07+09:00 Subject: Re: One-Liners Mashup (#177 again) ------=_Part_181_18422612.1221942806424 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Periodicity of 1/n -> length of the recurring sequence of the decimal fraction of 1/n - 1/3 = 0.3333333.... -> "3" -> 1 - 1/7 = 0.1428571428571.... -> "142957" -> 6 - 1/11 = 0.09090909.... -> "09" -> 2 a bonus point: other than decimal fraction Regards Holger 2008/9/20 Matthew Moss > > > Write a function per(n) which returns the periodicity of 1/n, i.e. > > per(3) => 1 > > per(4) => 0 > > per(7) => 6 > > per(11) => 2 > > I think you're going to have to explain what periodicity is, or > provide a link... I've no clue. > > ------=_Part_181_18422612.1221942806424--