login
A091856
Beginning with 1, minimum value such that gcd(a(2n-1),a(2n)) = 1, gcd(a(2n),a(2n+1))>1 and a(n) > a(n-1).
2
1, 2, 4, 5, 10, 11, 22, 23, 46, 47, 94, 95, 100, 101, 202, 203, 210, 211, 422, 423, 426, 427, 434, 435, 438, 439, 878, 879, 882, 883, 1766, 1767, 1770, 1771, 1778, 1779, 1782, 1783, 3566, 3567, 3570, 3571, 7142, 7143, 7146, 7147, 7154, 7155, 7158, 7159
OFFSET
1,2
LINKS
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
Sequence in context: A299322 A365501 A080735 * A083416 A022770 A141481
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