The distinct prime factors of a positive integer are defined as the numbers , ..., in the prime factorization
(1)

(Hardy and Wright 1979, p. 354).
A list of distinct prime factors of a number can be computed in the Wolfram Language using FactorInteger[n][[All, 1]], and the number of distinct prime factors is implemented as PrimeNu[n].
The first few values of for , 2, ... are 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, ... (OEIS A001221; Abramowitz and Stegun 1972, Kac 1959). This sequence is given by the inverse Möbius transform of , where is the characteristic function of the prime numbers (Sloane and Plouffe 1995, p. 22). The prime factorizations and distinct prime factors of the first few positive integers are listed in the table below.
prime factorization  distinct prime factors (A027748)  
1    0   
2  2  1  2 
3  3  1  3 
4  1  2  
5  5  1  5 
6  2  2, 3  
7  7  1  7 
8  1  2  
9  1  3  
10  2  2, 5  
11  11  1  11 
12  2  2, 3  
13  13  1  13 
14  2  2, 7  
15  2  3, 5  
16  1  2 
The numbers consisting only of distinct prime factors are precisely the squarefree numbers.
A sum involving is given by
(2)

for (Hardy and Wright 1979, p. 255).
The average order of is
(3)

(Hardy 1999, p. 51). More precisely,
(4)

(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where is the Mertens constant and are Stieltjes constants. Furthermore, the variance is given by
(5)

where
(6)
 
(7)

(OEIS A091588), where
(8)

(OEIS A085548) is the prime zeta function (Finch 2003). The coefficients and are given by the sums
(9)
 
(10)
 
(11)
 
(12)
 
(13)

(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where
(14)
 
(15)
 
(16)
 
(17)

(Finch 2003).
If is a primorial, then
(18)

(Hardy and Wright 1979, p. 355).
The summatory function of is given by
(19)

where is the Mertens constant (Hardy 1999, p. 57), the term (Hardy and Ramanujan 1917; Hardy and Wright 1979, p. 355) has been rewritten in a more explicit form, and and are asymptotic notation. The first few values of the summatory function are 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15, 17, 19, 20, 21, ... (OEIS A013939). In addition,
(20)

(Hardy and Wright 1979, p. 357).
The first few numbers which are products of an odd number of distinct prime factors (Hardy 1999, p. 64; Ramanujan 2000, pp. xxiv and 21) are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 42, 43, 47, ... (OEIS A030059). satisfies
(21)

(Hardy 1999, pp. 6465). In addition, if is the number of with , then
(22)

(Hardy 1999, pp. 6465).