OFFSET
1,7
COMMENTS
a(A249684(n)) = 0.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
. ----+------------+------------------------------------------+-----
. 3 | 3 | _ | 0
. 4 | 5 | 4 | 1
. 5 | 4 | _ | 0
. 6 | 7 | 6 | 1
. 7 | 9 | 6, 8 | 2
. 8 | 8 | 6 | 1
. 9 | 11 | 6, 10 | 2
. 10 | 13 | 6, 10, 12 | 3
. 11 | 6 | _ | 0
. 12 | 17 | 10, 12, 14, 15, 16 | 5
. 13 | 19 | 10, 12, 14, 15, 16, 18 | 6
. 14 | 10 | _ | 0
. 15 | 21 | 12, 14, 15, 16, 18, 20 | 6
. 16 | 23 | 12, 14, 15, 16, 18, 20, 22 | 7
. 17 | 16 | 12, 14, 15 | 3
. 18 | 15 | 12, 14 | 2
. 19 | 29 | 12, 14, 18, 20, 22, 24, 25, 26, 27, 28 | 10
. 20 | 14 | 12 | 1
. 21 | 25 | 12, 18, 20, 22, 24 | 5
. 22 | 27 | 12, 18, 20, 22, 24, 26 | 6
. 23 | 22 | 12, 18, 20 | 3
. 24 | 31 | 12, 18, 20, 24, 26, 28, 30 | 7
. 25 | 35 | 12, 18, 20, 24, 26, 28, 30, 32, 33, 34 | 10 .
PROG
(Haskell)
a249777 n = a249777_list !! (n-1)
a249777_list = 0 : 0 : f 2 1 [3..] where
f x y zs = g zs 0 where
g (u:us) w | gcd y u > 1 || gcd x u > 1 = g us (w + 1)
| otherwise = w : f u x (delete u zs)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 05 2014
STATUS
approved