The distribution of the primes of the forms [Formula: see text] and [Formula: see text] are studied extensively, where [Formula: see text] denotes the largest integer not exceeding [Formula: see text]. In this paper, we will consider several new type problems on the distribution of the primes involving the ceiling (floor) function. For any real number [Formula: see text] with [Formula: see text], let [Formula: see text] be the number of integers [Formula: see text] with [Formula: see text] such that [Formula: see text] is prime and let [Formula: see text] be the number of primes [Formula: see text] for which there exists an integer [Formula: see text] with [Formula: see text] such that [Formula: see text], where [Formula: see text] denotes the least integer not less than [Formula: see text]. These are closely related to the number of the prime factors of the denominator of the Bernoulli polynomial [Formula: see text]. In this paper, we study asymptotic properties of [Formula: see text] and [Formula: see text]. The methods in this paper are also effective for corresponding distribution functions of the primes involving the floor function.