Least m such that n! + m is prime: Difference between revisions
Content added Content deleted
(Added Sidef) |
m (Minor bug fix in the task description) |
||
Line 9: | Line 9: | ||
'''2! = 2'''. The next prime greater than '''2''' is '''3'''. '''3 - 2 = 1''', so '''a(2) = 1'''. |
'''2! = 2'''. The next prime greater than '''2''' is '''3'''. '''3 - 2 = 1''', so '''a(2) = 1'''. |
||
'''3! = 6'''. The next prime greater than '''6''' is '''7'''. '''7 - 6 = 1''', so '''a(3) = 1'''. |
'''3! = 6'''. The next prime greater than '''6''' is '''7'''. '''7 - 6 = 1''', so '''a(3) = 1'''. |
||
'''4! = 24'''. The next prime greater than '''24''' is ''' |
'''4! = 24'''. The next prime greater than '''24''' is '''29'''. '''29 - 24 = 5''', so '''a(4) = 5'''. |
||
and so on... |
and so on... |