Ergodic theory of horocycle flow and nilflow has been proved to be useful for analyzing the randomness of Mobius function, a function which reveals the mystery of prime numbers. In this survey talk, we will introduce Mobius function and several conjectures about its randomness, such as Chowla conjecture and Hardy-Littlewood conjecture. We will explain results of Green-Tao-Zielger and Bourgain-Sarnak-Ziegler related to these conjectures. This talk is intended for senior undergraduate students and first year graduate students.