OFFSET
0,4
COMMENTS
Does every rational number in range (0,1) appear?
a(0) = 1 by convention.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
EXAMPLE
Sequence of rationals begins 1, 1/2, 1/3, 2/3, 1/5, 2/5, 3/5, 1/7, 2/7, 3/7, 5/7, 1/8, 1/4, 3/8, 5/8, 7/8, 1/11, 2/11, ...
MATHEMATICA
nmax = 14;
b[1] = 1; F = {1};
For[n = 2, n <= nmax, n++,
For[k = b[n-1]+1, True, k++, Fk = Join[{k^2}, Table[b[i]*k, {i, 1, n-1}]] // Union; If[Fk~Intersection~F == {}, b[n] = k; F = F~Union~Fk; Break[]]]];
Join[{1}, Table[b[k]/b[n], {n, 1, nmax}, {k, 1, n-1}]] // Flatten // Numerator (* Jean-François Alcover, Aug 23 2022, after _Robert Israel in A066720 *)
PROG
(Haskell)
import Data.List (inits)
import Data.Ratio ((%), numerator)
a066657 n = a066657_list !! n
a066657_list = map numerator
(1 : (concat $ tail $ zipWith (\u vs -> map (% u) vs)
a066720_list (inits a066720_list)))
-- Reinhard Zumkeller, Nov 19 2013
CROSSREFS
KEYWORD
nonn,frac,nice
AUTHOR
N. J. A. Sloane, Jan 18 2002
STATUS
approved