Finch's student reminds him a lot of himself on Person of Interest. "2pR" is the 11th episode of the show's second season.
Added:

Person of Interest Season 2 Episode 11 Quotes

Math is not punishment.

Finch

That line you're talking about? I crossed it a long time ago.

Carter