Let bn=n2an+2 for all n≥1. The recurrence relation becomes
(n+1)(bn+1−2)=2(2n+1)(bn−2)+2(3n+1).
This is the same as
bn+1=n+12(2n+1)bn.
It follows that
bn=n2(2n−1)bn−1=n(n−1)22(2n−1)(2n−3)bn−2=⋯=n!2n−1(2n−1)!!b1,
where (2n−1)!!=(2n−1)(2n−3)⋯(1). Since b1=a1+2=2, we have
bn=n!2n(2n−1)!!=(n!)2(2n)!!(2n−1)!!=(n!)2(2n)!=(n2n).
Therefore, we obtain
an=n2bn−2=n21[(n2n)−2].
By Vandermonde's identity, we can rewrite this as
an=n21(k=0∑n(kn)2−2)=n21(k=1∑n−1(kn)2).
When n=p is a prime, we have p∣(kp) for 1≤k≤n−1, and so p2∣(kp)2. This implies ap∈Z. Clearly, ap>0. Since there are infinitely many prime numbers, there are infinitely many terms which are positive integers.