A186971 Maximal cardinality of a subset of {1, 2, ..., n} containing n and having pairwise coprime elements.
1, 2, 3, 3, 4, 3, 5, 5, 5, 4, 6, 5, 7, 6, 6, 7, 8, 7, 9, 8, 8, 8, 10, 9, 10, 9, 10, 9, 11, 9, 12, 12, 11, 11, 11, 11, 13, 12, 12, 12, 14, 12, 15, 14, 14, 14, 16, 15, 16, 15, 15, 15, 17, 16, 16, 16, 16, 16, 18, 16, 19, 18, 18, 19, 18, 17, 20
Offset: 1
Keywords
Examples
a(4) = 3 because 4 and 2 are not coprime and {1,3,4} is a maximal subset of {1,2,3,4} with pairwise coprime elements. a(9) = 5, the maximal subsets are {1,2,5,7,9}, {1,4,5,7,9}, {1,5,7,8,9}.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory): a:= n-> `if`(n<4, n, pi(n) -nops(factorset(n)) +2): seq(a(n), n=1..120);
Comments