# Is OEIS A248049 an integer sequence?

The OEIS sequence A248049 is defined by

$$an=(an−1+an−2)(an−2+an−3)an−4with a0=2,a1=a2=a3=1. a_n \!=\! \frac{(a_{n-1}\!+\!a_{n-2})(a_{n-2}\!+\!a_{n-3})}{a_{n-4}} \;\text{with }\; a_0\!=\!2, a_1\!=\!a_2\!=\!a_3\!=\!1.$$

is apparently an integer sequence but I have no proofs. I have numerical evidence using PARI/GP and Mathematica only. It is a real
problem because its companion
OEIS sequence A248048 has the same
recursion with $$a0=−1,a1=a2=a3=1\,a_0=-1, a_1=a_2=a_3=1\,$$ but now $$a144\,a_{144}\,$$ has a denominator of $$22$$. There is a
resemblance to the Somos-4 sequence but that probably won’t help with an integrality proof.

I have some interesting unproven observations about its
factorization algebraically and $$pp$$-adically for a few small values of $$pp$$, but nothing that would prove integrality. For example, if
$$x0,x1,x2,x3\,x_0,x_1,x_2,x_3\,$$ are indeterminates, and
we use initial values of
$$a0=x0,a1=x1,a2=x2,a3=x3 and x4:=x1+x2, a_0=x_0,\; a_1=x_1,\; a_2=x_2,\; a_3=x_3 \;\text{ and }\; x_4 := x_1+x_2,$$ with the same recursion, then $$an\,a_n\,$$ has denominator a monomial in
$$x0,x1,x2,x3,x4\,x_0,x_1,x_2,x_3,x_4\,$$ with
exponents from OEIS sequence A023434.
Since $$x0=x4=2\,x_0=x_4=2\,$$ with the original sequence I can’t prove that the numerator
has enough powers of $$22$$ to compensate. Another
example is that $$a12n+k\,a_{12n+k}\,$$ is odd for $$k=1,2,3\,k=1,2,3\,$$ and
even for the other residue classes modulo $$1212$$. I also have
some further observations about its $$22$$-adic valuation
behavior which I can’t prove.

By the way, the sequence grows very fast. My best
estimate is $$log(an)≈1.25255cn\,\log(a_n) \approx 1.25255\, c^n\,$$
where $$c\,c\,$$ is the plastic constant OEIS sequence A060006. Note
that $$x4−x3−x2+1=(x−1)(x3−x−1)x^4-x^3-x^2+1 = (x-1)(x^3-x-1)$$ and
$$c\,c\,$$ is the real root of the cubic factor.

Can anyone give a proof of integrality of A248049?

A proof of integrality can be based on elementary algebra and some fortunate observations. The Darij Grinberg comments reminded me of some of my work I did in 2013 and which I did

Factorization of the $$an\,a_n\,$$ sequence suggests the Ansatz

$$an=pnpn+1pn+2pn+3 a_n = p_n p_{n+1} p_{n+2} p_{n+3}$$

where $$pn\,p_n\,$$ is some sequence yet to be determined.
The sequence $$an\,a_n\,$$ is supposed to satisfy a recurrence. For example, we must have

$$a4a0=(a1+a2)(a2+a3). a_4a_0 = (a_1+a_2)(a_2+a_3).$$

Rewriting this equation in terms of $$p\,p\,$$ and solving for
$$p7\,p_7\,$$ gives the rational solution

$$p7=(p1+p5)(p2+p6)p3p4p0p1p6. p_7 = \frac{(p_1 + p_5)(p_2 +p_6) p_3 p_4}{p_0 p_1 p_6}.$$

Rewrite this as a polynomial equation to get

$$p6p0p7p1=(p1+p5)p3(p2+p6)p4. p_6p_0p_7p_1 = (p_1 + p_5)p_3(p_2 + p_6)p_4.$$

Now suppose that $$pn\,p_n\,$$ satisfies the recurrence

$$pn=pn−3pn−1+pn−5pn−6. p_n = p_{n-3}\frac{p_{n-1} + p_{n-5}}{p_{n-6}}.$$

Check that this recurrence satisfies the polynomial
equation for $$p7.\,p_7.\,$$

From the $$pn\,p_n\,$$ recurrences for $$n=9\,n=9\,$$ and
$$n=6\,n=6\,$$ we have

$$p9p3=(p4+p8)p6 and p6p0=(p1+p5)p3. p_9p_3 = (p_4 + p_8)p_6 \quad \text{ and } \quad p_6p_0 = (p_1 + p_5)p_3.$$

Combine the two equations to simply get

$$(p0+p4+p8)p6=(p1+p5+p9)p3. (p_0 + p_4 + p_8)p_6 = (p_1 + p_5 + p_9)p_3.$$

This implies that the number

$$c:=p0+p4+p8p3p4p5=p1+p5+p9p4p5p6 c := \frac{ p_0 + p_4 + p_8 }{p_3 p_4 p_5} = \frac{ p_1 + p_5 + p_9 }{p_4 p_5 p_6}$$

is constant and thus, the sequence $$pn\,p_n\,$$ satisfies the
equation

$$pn+pn−4+pn−8=cpn−3pn−4pn−5. p_{n}+p_{n-4}+p_{n-8} = c\,p_{n-3}p_{n-4}p_{n-5}.$$

By the way, defining another constant

$$s:=√(a2+a1)a2a0/(a3a1) s := \sqrt{(a_2+a_1)a_2a_0/(a_3a_1)}$$

implies the equation

$$c=s(a0+a1+a2)(a1+a2+a3)a0a2(a1+a2), c = s\frac{(a_0+a_1+a_2)(a_1+a_2+a_3)}{a_0a_2(a_1+a_2)},$$

or more symmetrically, this can be written as

$$c=(a0+a1+a2)(a1+a2+a3)√a0a1a2a3(a1+a2). c = \frac{(a_0+a_1+a_2)(a_1+a_2+a_3)} {\sqrt{a_0a_1a_2a_3(a_1+a_2)}}.$$

Given values of $$p0\,p_0\,$$ and $$p1\,p_1\,$$ then
$$p2=s/p0\,p_2 = s/p_0\,$$ and $$p3=a0/(p1s)\,p_3 = a_0/(p_1s)\,$$
while the two sequences are related by
$$pn=pn−4an−3/an−4.\,p_n = p_{n-4}a_{n-3}/a_{n-4}.\,$$

If the sequence terms $$p0,p1,…,p7\,p_0, p_1,\dots, p_7\,$$ are integers
and the constant $$c\,c\,$$ is an integer, then this implies that
$$pn\,p_n\,$$ is an integer sequence, and also $$an\,a_n\,$$ using the
Ansatz. In our case, $$c=6\,c=6\,$$ and the sequence $$pn\,p_n\,$$
begins $$1,1,1,1,1,1,2,3,4,10,33,140,….\,1,1,1,1,1,1,2,3,4,10,33,140,\dots.\,$$
This sequence was known to me in 2013 but I
do not think I connected it to A248049 at that time.

A simpler example of a sequence similar to $$p\,p\,$$
is OEIS A064098 with
$$anan−3=a2n−1+a2n−2 a_na_{n-3} = a_{n-1}^2 + a_{n-2}^2$$
and now with a constant
$$c:=a2n+a2n+1+a2n+2anan+1an+2 c := \frac{a_n^2+a_{n+1}^2+a_{n+2}^2} {a_na_{n+1}a_{n+2}}$$
such that the sequence $$an\,a_n\,$$ also satisfies
$$an+an−3=can−1an−2. a_n + a_{n-3} = c\,a_{n-1}a_{n-2}.$$