PUMaC 2011 Team Sudoku Problem 20

The n^{\text {th }} s-gonal number P(s, n) is defined as

P(s, n)=(s-3) T_{n-1}+T_{n}

where T_{i} is the i^{\text {th }} triangular number (recall that the i^{\text {th }} triangular number is the sum of the numbers 1 through i ). Find the least N such that N is both a 34-gonal number, and a 163-gonal number.