OFFSET
1,1
COMMENTS
For the large numbers (p > 70), the Maple program below is very slow. So we use a process of two steps: first, factor 10^p-1 using the elliptic curve method; then, for each factor q(k), k=1,2,...,r, compute the period of 1/q(k) and keep the period q(i) such that q(i) ... [unfinished sentence? - R. J. Mathar, Feb 24 2010] Compare the Maple section of A170945!
REFERENCES
V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.
LINKS
R. Javonovic, Lucas Function Calculator
EXAMPLE
a(1)=3 because the period of 1/3 = 0.333... is 1, and 3 is the smallest number with that period.
a(2)=27 because the period of 1/27 = 0.037037... is 3 = A000204(2), and 27 is the smallest number with that period.
a(3)=101 because the period of 1/101 = 0.00990099... is 4 = A000204(3), and 101 is the smallest number with that period.
a(4)= 239 because the period of 1/239 = 0.00418410041841... is 7 = A000204(4), and 239 is the smallest number with that period.
MAPLE
T:=array(0..100); U:=array(0..100); n0:=1: n1:=3: T[1] := 1: T[2] := 3:for i from 3 to 30 do: n2:=n0+n1: T[i]:=n2: n0:=n1: n1:=n2: od:
for q from 1 to 7 do: p0:=T[q]: indic:=0: for n from 1 to 25000 do: for p from 1 to 30 while(irem(10^p, n)<>1 or gcd(n, 10)<>1 ) do: od: if irem(10^p, n) = 1 and gcd(n, 10) = 1 and p=p0 and indic=0 then U[q]:=n: indic:=1: else fi: od: od:
for n from 1 to 7 do: print( U[n]): od:
MATHEMATICA
(* This [slow] mma program gives all denominators < 50000 and disagrees with existing sequence for n = 11: a(11) = 797 instead of 29453 *) a204[n_] := a204[n] = Coefficient[Series[(2 - t )/(1 - t - t^2), {t, 0, n}], t^n] ; a7732[n_] := a7732[n] = MultiplicativeOrder[10, FixedPoint[Quotient[#, GCD[#, 10]] &, n]]; a[n_] := (k = 2; While[k++; k < 50000 && a7732[k] != a204[n] ]; k); Table[a[n], {n, 1, 15}](* Jean-François Alcover, Sep 02 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 19 2010
EXTENSIONS
References to unrelated sequences removed by R. J. Mathar, Feb 24 2010
STATUS
approved