I can't give time to checking timetables right this minute, but agree with above advice. Just be careful that train arrival allows at least half an hour to get to bus station in Pamplona. Best way at that point, taxi to bus station. If you miss it, other threads advise hunting for likely...