There are two families of answers: (a) an=c(n+2)n ! for all n≥1 and a0=c+1 for some integer c≥2014, and (b) an=c(n+2)n ! for all n≥1 and a0=c−1 for some integer c≥2016. Let {an}n=0∞ be a sequence of positive integers satisfying the given conditions. We can rewrite (ii) as sn+1=(n+1)an+hn, where hn∈{−1,1}. Substituting n with n−1 yields sn=nan−1+hn−1, where hn−1∈{−1,1}. Note that an+1=sn+1+sn, therefore there exists δn∈{−2,0,2} such that an+1=(n+1)an+nan−1+δn We also have ∣s2−2a1∣=1, which yields a0=3a1−a2±1≤3a1, and therefore a1≥3a0≥671. Substituting n=2 in (1), we find that a3=3a2+2a1+δ2. Since a1∣a3, we have a1∣3a2+δ2, and therefore a2≥223. Using (1), we obtain that an≥223 for all n≥0. Lemma 1: For n≥4, we have an+2=(n+1)(n+4)an. Proof. For n≥3 we have an=nan−1+(n−1)an−2+δn−1>nan−1+3 By applying (2) with n substituted by n−1 we have for n≥4, an=nan−1+(n−1)an−2+δn−1<nan−1+(an−1−3)+δn−1<(n+1)an−1 Using (1) to write an+2 in terms of an and an−1 along with (2), we obtain that for n≥3, an+2=(n+3)(n+1)an+(n+2)nan−1+(n+2)δn+δn+1<(n+3)(n+1)an+(n+2)nan−1+3(n+2)<(n2+5n+5)an. Also for n≥4, an+2=(n+3)(n+1)an+(n+2)nan−1+(n+2)δn+δn+1>(n+3)(n+1)an+nan=(n2+5n+3)an. Since an∣an+2, we obtain that an+2=(n2+5n+4)an=(n+1)(n+4)an, as desired. Lemma 2: For n≥4, we have an+1=n+2(n+1)(n+3)an. Proof. Using the recurrence an+3=(n+3)an+2+(n+2)an+1+δn+2 and writing an+3, an+2 in terms of an+1,an according to Lemma 1 we obtain (n+2)(n+4)an+1=(n+3)(n+1)(n+4)an+δn+2 Hence n+4∣δn+2, which yields δn+2=0 and an+1=n+2(n+1)(n+3)an, as desired. Suppose there exists n≥1 such that an+1=n+2(n+1)(n+3)an. By Lemma 2, there exist a greatest integer 1≤m≤3 with this property. Then am+2=m+3(m+2)(m+4)am+1. If δm+1=0, we have am+1=m+2(m+1)(m+3)am, which contradicts our choice of m. Thus δm+1=0. Clearly m+3∣am+1. Write am+1=(m+3)k and am+2=(m+2)(m+4)k. Then (m+ 1) am+δm+1=am+2−(m+2)am+1=(m+2)k. So, am∣(m+2)k−δm+1. But am also divides am+2=(m+2)(m+4)k. Combining the two divisibility conditions, we obtain am∣(m+4)δm+1. Since δm+1=0, we have am∣2m+8≤14, which contradicts the previous result that an≥223 for all nonnegative integers n. So, an+1=n+2(n+1)(n+3)an for n≥1. Substituting n=1 yields 3∣a1. Letting a1=3c, we have by induction that an=n!(n+2)c for n≥1. Since ∣s2−2a1∣=1, we then get a0=c±1, yielding the two families of solutions. By noting that (n+2)n!=n!+(n+1)!, we have sn+1=c(n+2)!+(−1)n(c−a0). Hence both families of solutions satisfy the given conditions.