The terms of the sequence A276123, defined by $a_0=a_1=a_2=1$ and $$a_n=\dfrac{(a_{n-1}+1)(a_{n-2}+1)}{a_{n-3}}\;,$$ are all integers (it's easy to prove that for all $n\geq2$, $a_n=\frac{9-3(-1)^n}{2}a_{n-1}-a_{n-2}-1$).

But is it also true for the sequence A276175 defined by $a_0=a_1=a_2=a_3=1$ and $$a_n=\dfrac{(a_{n-1}+1)(a_{n-2}+1)(a_{n-3}+1)}{a_{n-4}} \;\;?$$

Update : I crossposted to MO.


Yes, $(a_n)$ is a sequence of integers.

To prove this we first need to study some auxiliary sequences that satisfy a polynomial recurrence relation (unlike $(a_n)$ which has a rational fraction as its recurrence).

Consider the sequences $(b_n)$ of positive reals satisfying the recurrence relation $b_nb_{n+4} = b_{n+1}b_{n+2}b_{n+3} + 1$.

It turns out we can express $b_{n+8}$ as a polynomial in $b_n, \ldots, b_{n+7}$ :

Since $b_{n+1}b_{n+5} \equiv b_{n+2}b_{n+6} \equiv b_{n+3}b_{n+7} \equiv 1 \pmod {b_{n+4}}$ and $b_{n+1}b_{n+2}b_{n+3} \equiv -1 \pmod {b_{n+4}}$, we have $b_{n+5}b_{n+6}b_{n+7} \equiv -1 \pmod {b_{n+4}}$, which suggests the existence of a formula for $b_{n+8}$.

With this roadmap, we can write

$(b_{n+1}b_{n+2}b_{n+3})(b_{n+5}b_{n+6}b_{n+7}+1) \\ = (b_{n+1}b_{n+5})(b_{n+2}b_{n+6})(b_{n+3}b_{n+7}) + (b_{n+1}b_{n+2}b_{n+3}) \\ = (b_{n+2}b_{n+3}b_{n+4}+1)(b_{n+3}b_{n+4}b_{n+5}+1)(b_{n+4}b_{n+5}b_{n+6}+1)+(b_nb_{n+4}-1) \\ = b_{n+4}.F(b_{n+i})$

where $F$ is some big polynomial. And finally,

$(b_{n+5}b_{n+6}b_{n+7}+1) = (b_{n+5}b_{n+6}b_{n+7}+1)(b_nb_{n+4} - b_{n+1}b_{n+2}b_{n+3}) \\ = b_{n+4}(b_nb_{n+5}b_{n+6}b_{n+7}+b_n - F(b_{n+i})) = b_{n+4} G(b_{n+i})$.

And so, $b_{n+8} = G(b_{n+i})$. This means that if $b_0, \ldots, b_7 \in R$ for some subring $R$ of $\Bbb R$, then the whole sequence is in $R$.


Now to link back to the original sequence.

Given such a sequence $(b_n)$, we define a sequence $(a_n)$ by $a_n = b_nb_{n+1}b_{n+2}$.

This sequence satisfies $a_na_{n+4} = (b_n b_{n+1}b_{n+2})(b_{n+4}b_{n+5}b_{n+6}) \\ = (b_n b_{n+4})(b_{n+1} b_{n+5})(b_{n+2} b_{n+6}) = (b_{n+1}b_{n+2}b_{n+3}+1)(b_{n+2}b_{n+3}b_{n+4}+1)(b_{n+3}b_{n+4}b_{n+5}+1) \\ = (a_{n+1}+1)(a_{n+2}+1)(a_{n+3}+1)$.

Finally, taking $b_0 \ldots b_7 = \frac 12, 4, \frac 12, \frac 12, 4, \frac 12, 4, 18$, we obtain a sequence $(b_n)$ with terms in $\Bbb Z[\frac 12]$, with the corresponding $(a_n)$ sequence $1,1,1,1,8,36, \ldots$

Since the recurrence relation is symmetric, it can go backwards as well as forward, hence the ring $R_n = \Bbb Z[b_n, \ldots, b_{n+7}]$ is independant of $n$. There is no hope of finding $8$ consecutive integer values in our sequence $b_n$.

If we look at the sequence $(b_n)$ modulo $8$, from our first octuplet and by applying the polynomial transformation, we can get to $17225$ different octuplets mod $8$, and none of those correspond to any noninteger $a_n$. This computation proves that $a_n$ is an integer forall $n$ (be careful, one step can go from one octuplet to several octuplets, because precision can be lost sometimes).


Note that using this definition,

$a_na_{n+2}/a_{n+1}(a_{n+1}+1) = b_nb_{n+2}b_{n+4}/(b_{n+1}b_{n+2}b_{n+3}+1) = b_{n+2}$,

and so to go in the other direction you have to define $(b_n)$ from $(a_n)$ with $b_n = a_{n-2}a_n/a_{n-1}(a_{n-1}+1)$. Then, once again the recurrence relation of $(b_n)$ follows from that of $(a_n)$.

This shows that for any such rational sequence $(a_n)$, there is a corresponding rational sequence $(b_n)$, and so $(a_n)$ is in a finitely generated subring of $\Bbb Q$.