RI> ... But for those n >= 6 for which a(n-1) = 1 (of which there are 166 up to n=1000), a(n) seems to be very close to (n-1)^2. Just an aside, I think the sequence 2, 3, 5, 7, 9, 11, 17, 25, 33, 35, 37, 39, 43, 45, 51, 57 ... is interesting enough to be also submitted to OEIS. Peter