Problem

Source: Canada RepĂȘchage 2017/1

Tags: number theory



Malcolm writes a positive integer on a piece of paper. Malcolm doubles this integer and subtracts 1, writing this second result on the same piece of paper. Malcolm then doubles the second integer and adds 1, writing this third integer on the paper. If all of the numbers Malcolm writes down are prime, determine all possible values for the first integer.