Completed printPowersOf2