On functions taking only prime values
  For n=1,2,3,... define S(n) as the smallest integer m>1 such that those 2k(k-1) mod m for k=1,...,n are pairwise distinct; we show that S(n) is the least prime greater than 2n-2 and hence the value set of the function S(n) is exactly the set of all prime numbers. For every n=4,5,... we prove that the least prime p>3n with 3|p-1 is just the least positive integer m such that 18k(3k-1) (k=1,...,n) are pairwise distinct modulo m. For d=4,6,12 and n=3,4,...., we prove that the least prime p>2n-2 with p=-1 (mod d) is the smallest integer m such that those (2k-1)^d for k=1,...,n are pairwise distinct modulo m.   We also pose several challenging conjectures on primes. For example, we find a surprising recurrence for primes, namely, for every n=10,11,... the (n+1)-th prime p_{n+1} is just the least positive integer m such that 2s_k^2 (k=1,...,n) are pairwise distinct modulo m where s_k = sum_{j=1}^k(-1)^{k-j}p_j. We also conjecture that for any positive integer m there are consecutive primes p_k,...,p_n (k<n) not exceeding 2m+2.2*sqrt(m) such that m = p_n-p_{n-1}+...+(-1)^{n-k}p_k. 
Zhi-Wei Sun
math.NT math.CO