login
A297616
a(n) is the number of connected components in the graph with vertices 1..n and adjacency criterion i and j not coprime.
0
1, 2, 3, 3, 4, 3, 4, 4, 4, 3, 4, 4, 5, 4, 4, 4, 5, 5, 6, 6, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 7, 7, 7, 6, 6, 6, 7, 6, 6, 6, 7, 7, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 8, 9, 9, 10, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 11, 11, 11, 11, 11, 12, 12, 12, 11, 12, 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 11, 11, 11, 12
OFFSET
1,2
FORMULA
a(n) = 1 + pi(n) - pi(n / 2) + [n >= 4], where pi denotes the prime counting function (A000720, generalized to reals), and [] the Iverson bracket.
MATHEMATICA
A[n_] := Length[
ConnectedComponents[
AdjacencyGraph[Map[Boole[# != 1] &, Array[GCD, {n, n}], {2}]]]]
Table[A[n], {n, 1, 107}]
PROG
(PARI) a(n) = 1 + primepi(n) - primepi(n / 2) + (n >= 4); \\ Michel Marcus, Jan 09 2018
CROSSREFS
Cf. A000720.
Sequence in context: A285203 A085887 A305716 * A213251 A049108 A179846
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jan 01 2018
STATUS
approved