Composite numbers and squares from recursive series

This has to do with the 2nd order recursive sequence [tex]\{...a, b,
c ...\}[/tex] where a,b,c are any three sucessive terms and [tex]c = 6b-a + 2k[/tex].
I found that it has the following property.
[tex]8ab - (a+b-k)^2 = 8bc - (b+c-k)[/tex] That is eight times the product of two adjacent terms always equals the square of the difference between [tex]k[/tex] and the sum of the adjacent terms plus a number that is independent of three sucessive terms of the series are chosen.

A related property is the following. Again it is independent of which three sucessive terms of this sequence is chosen.

[tex]8a(a+k) - (b-3a-k)^2 = 8b(b+k) - (c-3b-k)^2[/tex]

The proof of both is by induction
The proof of the first relation follows:

Now if [tex]ab[/tex] is a triangular number for the first two terms of a
sequence, to make the product [tex]ab[/tex] to be a triangular number regardless of which pair of adjacent terms [tex]a \text{and} b[/tex] are in the sequence, we need to select a "k" such that [tex]8ab+1=(a+b-k)^2[/tex]

I will leave the proof of the second part and how it relates to square triangular numbers up to the reader.

Now since the above relation holds for any three consecutive terms of the recursive sequence, if the product of any two terms [tex]ab[/tex] is a triangular number then there is a [tex]k[/tex] such that [tex]8ab+1=(a+b-k)^2[/tex] because it is known that 8 times a triangular number + 1 is always a square. But recursively from the above proven relationship, the product of any two adjacent terms of such a series where [tex]k[/tex] is so defined is always a triangular number.

In the second relation let [tex]k=0[/tex] then [tex] 8a^2 = (b-3a)^2 +C [/tex] for any two adjacent terms of the recursive series. As an example the first two square triangular number are 0 and 1, since[tex] 8*0 = (1-0)^2 -1[/tex], [tex]C=-1[/tex]. Thus if b^2 is a triangular number, the next square triangular number [tex]c^2[/tex] is found by solving [tex]8b^2 =(c-3*b)^2 - 1[/tex].

Although square triangular numbers are well known, I haven't found a prior publication of this relationship. Surely someone before me must have noticed it. I would appreciate it if someone could lead me to a site that does discuss this.

In the second relation let [tex]k=0[/tex] then [tex] 8a^2 = (b-3a)^2 +C [/tex] for any two adjacent terms of the recursive series. As an example the first two square triangular number are 0 and 1, since[tex] 8*0 = (1-0)^2 -1[/tex], [tex]C=-1[/tex]. Thus if b^2 is a triangular number, the next square triangular number [tex]c^2[/tex] is found by solving [tex]8b^2 =(c-3*b)^2 - 1[/tex].

Although square triangular numbers are well known, I haven't found a prior publication of this relationship. Surely someone before me must have noticed it. I would appreciate it if someone could lead me to a site that does discuss this.

Square triangular numbers can be related to solutions of Pells equation [tex]x^2-2y^2=1[/tex]. If [tex]b^2=n(n+1)/2[/tex] is your square triangular number, then x=(2n+1) and y=2b is a solution to Pells, and vice versa (non-negative solutions).

Your formula for getting the next square triangular number c^2 from a square triangular number b^2 follows from the usual way of generating the solutions to this equation, i.e. the solutions are given by powers of [tex]3+2\sqrt{2}[/tex], so to go to the next solution you just multiply by this. You get the same relation between c and b as you have.

Square triangular numbers can be related to solutions of Pells equation [tex]x^2-2y^2=1[/tex]. If [tex]b^2=n(n+1)/2[/tex] is your square triangular number, then x=(2n+1) and y=2b is a solution to Pells, and vice versa (non-negative solutions).

Your formula for getting the next square triangular number c^2 from a square triangular number b^2 follows from the usual way of generating the solutions to this equation, i.e. the solutions are given by powers of [tex]3+2\sqrt{2}[/tex], so to go to the next solution you just multiply by this. You get the same relation between c and b as you have.

Thanks. I was aware of the relation to Pells equation but I dont see a easy way to get from the power of [tex]3+2\sqrt{2}[/tex] to my relation for [tex]a \text{ and }b[/tex]. Also my relation is more general since [tex]k[/tex] need not equal 0 and the difference [tex]a_{n}*(a_{n} + k)- (a_{\left(n+1\right)} -3a_{n} -k)^2[/tex] need not equal -1 although it is a constant. For instance the sequence [tex]\{ \dots 0, 3, 22, 133, \dots\} \text{ where } k = 2[/tex] has the property that [tex]a_{n} * (a_{n} + k)[/tex] is always a triangular number since the constant is -1 as is the case with square triangular numbers.

Thanks. I was aware of the relation to Pells equation but I dont see a easy way to get from the power of [tex]3+2\sqrt{2}[/tex] to my relation for [tex]a \text{ and }b[/tex].

It's a straightforward computation. If your square triangular number is b^2=n(n+1)/2, then [tex]n=(-1+\sqrt{1+8b^2})/2[/tex] so [tex]x=\sqrt{1+8b^2}[/tex] and [tex]y=2b[/tex]. Multiply [tex]\sqrt{1+8b^2}+2b\sqrt{2}[/tex] by [tex]3+2\sqrt{2}[/tex] to get [tex]blah+(2\sqrt{1+8b^2}+6b)\sqrt{2}[/tex], so your next square triangle is at c^2 where [tex]c=\sqrt{1+8b^2}+3b[/tex]

It's a straightforward computation. If your square triangular number is b^2=n(n+1)/2, then [tex]n=(-1+\sqrt{1+8b^2})/2[/tex] so [tex]x=\sqrt{1+8b^2}[/tex] and [tex]y=2b[/tex]. Multiply [tex]\sqrt{1+8b^2}+2b\sqrt{2}[/tex] by [tex]3+2\sqrt{2}[/tex] to get [tex]blah+(2\sqrt{1+8b^2}+6b)\sqrt{2}[/tex], so your next square triangle is at c^2 where [tex]c=\sqrt{1+8b^2}+3b[/tex]

Relation to Pathagorean triples found.
My friend wrote:
"The values of [tex]c[/tex] in [tex]a^2 + b^2 = c^2[/tex] where [tex]|b - a| = 1[/tex] and gcd(a,b)=1 are generated from this recurrence relation:
[tex]c(1)=5[/tex], [tex]c(2)=29[/tex], [tex]c(n) = 6*c(n-1) - c(n-2) [/tex]
( see http://www.research.att.com/~njas/sequences/A001653 [Broken] )
What I find interesting is that apparently all Pythagorean triples can be generated with such recurrence relations. I am far from being a mathematician, and so I cannot prove any of this.
It is sufficient to look at primitive triples where gcd(a,b)=1.
The possible values of the difference |b - a| in primitive triples are 1,7,17,23,31,... see http://www.research.att.com/~njas/sequences/A058529 [Broken] .
When |b-a| = 7, we have :
c(1)=13, c(2)=17, c(3)=73, c(4)=97, c(n) = 6*c(n-2) - c(n-4)
The values of a will be generated by:
a(1)=5, a(2)=8, a(3)=48, a(4)=65, a(n) = 6*a(n-2) - a(n-4) + 14

It follows from the relation [tex]8(a(n))^2 - (a(n+1)-3*a(n))^2 = C[/tex] where [tex]C[/tex] is a constant for recursive series of the form [tex]a(n) = 6a(n-1)-a(n-2)[/tex] that I found. If you note that if any two adjacent terms of the Pell-like series {a,b,2b+a,5b+2a, … 2*a(n-1) + a(n-2) } are selected as y and x of the Pathagorean triples: x^2 + y^2, x^2-y^2, and 2xy then the value for [tex](x^{2} - y^{2} - 2xy)^{2}[/tex] is a constant. Moreover, You will find that [tex]8{(a^{2} + b^{2})}^{2}-{({(2b+a)}^{2} + b^{2} \text{ minus }3(a^2+b^2))}^{2} = 4{(b^{2} - a^{2} \text{ minus } 2ab)}^{2}[/tex], i.e. the constant. Thus the series of c's for a constant absolute value of |[tex]x^2-y^2\text{ minus }2xy[/tex]| is in the form of [tex]a(n) = 6a(n-1)-a(n-2)[/tex] .
Note that you some times have more than one such series for a constant value of [tex]{(a^{2}-b^{2}\text{ minus }2ab)}^{2}[/tex] .