Book where children take a test and those who pass qualify for a special program

I can’t remember much but here is what I can. The Main Character signs up for the test and one of the rules is u can only bring one pencil. The MC runs into someone on his way to the test who lost her pencil, to solve this he breaks his pencil in half and then give the half with the tip to the other person. When they get to the test the MC asks to sharpen his end and the test begins. The problems were impossibly hard and the MC is already a pretty intelligent guy. However he continues reading through all the problems and discovers a pattern. The answers to #1 is in the question of #21. And the answer to #21 is in the question of #1. He uses this method and finishes the 40 question test. When he qualifies he goes somewhere and meets another character who goes by Sticky. His real name is George Washington and Goes by sticky because everything he reads “sticks to his brain”. He was able to answer the problems on the test from his own knowledge and didn’t recognize any pattern. This Stuns the MC cause he found the question to be impossibly difficult.