OFFSET
0,2
EXAMPLE
a(7) is a prime factor of a(6)^2+1 = 421^2 + 1 = 177242, which factors as 2*13*17*401. 2, 13, and 17 have already appeared in the sequence, so a(7) = 401.
a(10)^2+1 = 882 = 2 * 29^2. Both 2 and 29 have already appeared in the sequence, so it terminates.
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Franklin T. Adams-Watters, Dec 17 2016
STATUS
approved