login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A249777
Let z = A084937: a(n) = number of numbers <= z(n) that are != z(k) for k=1..n-1 and not coprime to z(n-1) and z(n-2).
8
0, 0, 0, 1, 0, 1, 2, 1, 2, 3, 0, 5, 6, 0, 6, 7, 3, 2, 10, 1, 5, 6, 3, 7, 10, 0, 10, 13, 0, 13, 16, 0, 5, 15, 1, 11, 16, 1, 6, 15, 2, 11, 16, 4, 16, 17, 2, 17, 12, 5, 16, 17, 3, 17, 18, 0, 20, 21, 0, 23, 28, 0, 23, 27, 1, 15, 30, 3, 17, 26, 4, 19, 28, 2, 21
OFFSET
1,7
COMMENTS
a(A249684(n)) = 0.
LINKS
EXAMPLE
. n | A084937(n) | unused numbers less than A084937(n) | a(n)
. ----+------------+------------------------------------------+-----
. 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
Sequence in context: A249858 A249857 A317441 * A289065 A132815 A167684
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 05 2014
STATUS
approved