If he wants to give these books equally to 2 of his friends, then 1 book will remain, it means possible number of books = 15,17,19,21,23,25,27,29
If he wants to give these books equally to 3 of his friends, then 2 books will remain, it means possible number of books = 17,20,23,26,29
If he wants to give these books equally to 4 of his friends, then 3 book will remain, it means possible number of books = 15,19,23,27
common number is only 23 so it will be answer