OFFSET
1,1
COMMENTS
All terms are congruent to 0 or 2 mod 3. It follows that no three consecutive integers are in the sequence. - Franklin T. Adams-Watters, Aug 31 2016, conjectured by David W. Wilson.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
MATHEMATICA
f[l_] := Block[{k = l}, Select[ Union[ Flatten[ AppendTo[k, Table[ k[[i]]*k[[j]] - 1, {i, 1, Length[k]}, {j, 1, i}]]]], # < 170 &]]; NestList[f, {2}, 6][[ -1]] (* Robert G. Wilson v, May 23 2004 *)
PROG
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a009388 n = a009388_list !! (n-1)
a009388_list = f [2] (singleton 2) where
f xs s = m : f xs' (foldl (flip insert) s' (map (pred . (* m)) xs'))
where xs' = m : xs
(m, s') = deleteFindMin s
-- Reinhard Zumkeller, Aug 15 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved