Skip to main content
1 of 2

[Maple], 106 [bytes]

For n = 7 returns {2, 3, 7, 13, 43, 139, 547} in 0.5 seconds.

a:=proc(n)p:=1;w:={};for k to n do p:=p^2+p;{seq(x[1],x=ifactors(p)[2])}minus w;w:=w union{min(%)}od end: