OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..264
FORMULA
a(2n) = a(2n-1) + 1, a(2n+1) = a(2n) + LeastPrimeFactor(a(2n)).
PROG
(Haskell)
a091856 n = a091856_list !! (n-1)
a091856_list = 1 : f 1 1 [2..] where
f s z xs = g xs where
g (u:us) = if gcd u z - s /= 1 then u : f (1 - s) u us else g us
-- Reinhard Zumkeller, Feb 17 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Mar 13 2004
EXTENSIONS
Edited and extended by Franklin T. Adams-Watters, Dec 26 2006
Typo in data corrected by D. S. McNeil, Aug 17 2010
STATUS
approved