Mathematica does a little better than WEC's Maple, calculating eleven terms (5, 3, 13, 5, 3, 29, 3, 13, 13, 3, 5) before encountering the inevitable limitation of Prime[n] for the twelfth term (at prime 17): NestList[Prime,17,12] {17,59,277,1787,15299,167449,2269733,37139213,718064159,16123689073,414507281407,12055296811267,Prime[12055296811267]}