#### Abstract

This work is about extended pythagorean triples, called NPT, APT, and AI-PT. We generate infinitely many NPTs and APTs and then develop algorithms for infinitely many AI-PTs. Since AI-PT is of , we ask generally for PT satisfying for any . These triples are solutions of certain diophantine equations.

#### 1. Introduction

A pythagorean triple (PT) is an integer solution satisfying the polynomial , and it is said to be primitive (PPT) if . There have been many ways for finding solutions of , and one of the well-known methods is due to Euclid, BC 300. The investigation of integer solutions of has been expanded to various aspects. One direction is to deal with polynomials , where in [1] its integer solutions were called almost pythagorean triple (APT) or nearly pythagorean triple (NPT) depending on the sign . Another side is to study solutions of having some special conditions. A solution is called isosceles if . Since there is no isosceles integer solution of , isosceles-like integer triples with were investigated. We shall call the an almost isosceles pythagorean triple (AI-PT), and typical examples are and . In literatures [2–4], AI-PT was studied by solving Pell polynomial. And a few others [5, 6] used triangular square numbers for finding AI-PT. We note that in some articles AI-PT was called almost isosceles right angled (AIRA) triangle. But in order to emphasize relationships with PT, APT, and NPT in this work, we shall refer to AIRA as AI-PT. APT and NPT were studied in [1] while AI-PT was studied in [2, 4], and so forth, but it seems that no one has asked about their connections.

In this work we generate infinitely many APTs and NPTs and then apply the results in order to develop algorithms for constructing infinitely many AI-PTs. Moreover we study PTs satisfying for any . So the study of these triples can be regarded as a research of solving diophantine equations and .

#### 2. Almost and Nearly Pythagorean Triples

APT and NPT, respectively, are integer solutions of and , respectively. If is an APT or NPT, so it is hence we generally assume . Some triples were listed in [1] by experimental observations: NPT: , , , APT: , , , , ,

Lemma 1 (see [1]). *If is an APT then is a NPT. Conversely if is a NPT then is an APT.*

Theorem 2. *If is an even integer then we have the following. *(1)* is an APT if , while it is a NPT if .*(2)* is an APT and is a NPT.*

*Proof. *If then . If then , so is an APT. If then , so is a NPT.

Due to Lemma 1, the NPT yields an APT , while the APT provides a NPT (see Table 1).

Theorem 2 gives infinitely many APTs and NPTs such that . Not only this, we can generate APT and NPT with .

Theorem 3. *(1) If and then is a NPT.**(2) If and then is an APT.*

*Proof. *The triple is a NPT if ; that is, . Since is integer, it must be and . So with . On the other hand is an APT if ; that is, . Similar to the above, we have and . Hence with .

Theorem 3 together with Lemma 1 yields infinitely many NPTs and APTs (see Table 2).

Though there are APT and NPT with , no NPT exists if or . In fact if is a NPT then . But since is quadratic nonresidue, no solution exists. Similarly if then , so no integer solution .

Theorem 4. *For any , APTs of the form always exist. If is even and square then there exist NPTs of the form .*

*Proof. *A triple is an APT if ; that is, . Then . Hence if we let and for , then it can be observed that is an APT. In particular, is an APT for all .

Let (). For to be a NPT, we must have ; that is, . Hence , soWrite for . Then and . And since , is a NPT.

For instance, , are APTs with . Similarly , are APTs with . So we have infinitely many APTs such that is any integer.

On the other hand, consider such that is square. Then Theorem 4 yields NPT satisfying and . If then and yielding that is a NPT; say , and so forth. If then and with implying that is a NPT; say , and so forth. If then and with implying that is a NPT; say , and so forth.

Corollary 5. *Let . If and for any then is a NPT.*

The proof is clear. Thus , , , are NPTs, where the list corresponds to the findings in [1]. We now discuss another way to construct NPTs from PPT.

Theorem 6. *For any PPT , there are NPTs with .*

*Proof. *The PPT can be written as , , and where are bipartite and . Let and (). Clearly and is odd. For to be a NPT, it satisfies and . So implies and .

If is a prime then has integer solutions since . So with , there exists a NPT of the form . On the other hand if ( odd primes, ), then implies that either every or there are even number of such that for . Thus Legendre symbol equals , so has integer solutions; hence there is a NPT .

The PPT with are , , , , , and . If then Table 3 contains the list of NPTs. When , NPTs are as shown in Table 4.

An APT satisfying is called an isosceles APT (iso-APT). Analogously an iso-NPT is defined. Though there is no isosceles PT, there are many iso-APTs and iso-NPTs. Indeed iso-APT and iso-NPT satisfy , so that the pair is an integer solution of , which is the Pell polynomial. If , are integer solutions of thenShows that satisfies . If , are roots of then holds .

Let us define a multiplication by [7]. For example, a root of yields satisfying . And a root of shows that holds . So the first few nonnegative solutions of arewhere the subscripts +, − indicate solutions of , respectively.

Theorem 7. *Let for with , . Then the following hold.*(1)* and and . So is a sequence of solutions of .*(2)*Let . Then by considering as a matrix.*(3)*Let , be subsets of consisting of , , respectively. If then and .*

*Proof. *The recurrence shows . So and . Hence if we assume and then and

Clearly () are solutions of , and . If satisfies the identities for thenNow and . So if we assume then .

Moreover for , satisfies . Similarly from , we have Thus if then and . This completes the proof.

Corollary 8. *Let be either iso-NPTs or iso-APTs. Define a multiplication by . Then the multiplication of iso-NPTs (or iso-APTs) yields an iso-NPT. And the multiplication of iso-APT and iso-NPT yields an iso-APT.*

The corollary about iso-APT and iso-NPT follows immediately. Hence sets and yield iso-NPTs and iso-APTs .

#### 3. Almost Isosceles Pythagorean Triple

The nonexistence of isosceles integer solution of intrigues investigations for finding solutions that look more and more like isosceles. By an almost isosceles pythagorean triple (AI-PT), we mean an integer solution of such that and differ by only . The triples , , , and are typical examples of AI-PT.

Let be an AI-PT with . If for then , so The solution is an integer if is a perfect square. In fact, if then , so , yields an AI-PT . Let for . Then , so . If then , so the pairs correspond to the pairs in Theorem 7. Hence the set together with , , , and provides Table 5 of AI-PT .

Theorem 9. *(1) When , let , , and . Then is an AI-PT with .**(2) If then is an AI-PT for , , and .*

*Proof. *If then is odd since in Theorem 7. So if we let then , , and Thussince satisfies . So is an AI-PT.

Similarly Theorem 7 says if then , where Hence by letting , , and , (1) implies that is an AI-PT.

Table 5 can be compared to the results in [2, 3]. A feature here is that we first generate infinitely many iso-NPTs and then find AI-PTs . For instance, , , in produce AI-PTs , , , respectively, by Theorem 9. Moreover Pell sequence provides iso-APT, iso-NPT, and AI-PTs.

Theorem 10. *Let be the Pell sequence with and . *(1)* is an iso-APT if is odd; otherwise it is an iso-NPT.*(2)* with even and with odd are AI-PTs.*

*Proof. *Let . Then , and it is easy to see by . Hence the determinant shows (1) due to Theorem 7.

For (2), clearly and is odd. If is even then , so by Theorem 9 we may letSo we have an AI-PT .

Now if is odd then . Again by Theorem 9, we have an AI-PT with , , and .

There are infinitely many iso-APTs and iso-NPTs by means of Pell sequence, where their corresponding pairs are regarded as solutions of . Moreover infinitely many AI-PTs arose from Pell sequence are solutions of with . Indeed, due to Theorem 10, if then satisfies , so it is an iso-APT, while meets , so it is an AI-PT. On the other hand if then is an iso-NPT satisfying , while is an AI-PT satisfying .

Besides Pell sequence, Fibonacci sequence is also useful to generate AI-PT. Horadam [8] proved that the four Fibonacci numbers generate a PT . So , , , , are all PTs. As a generalization, we say a sequence is Fibonacci type if with any initials and . Clearly if , and any four Fibonacci type numbers , , , and () yield a PT , Euclid’s formula. Let us consider Fibonacci type numbers and their corresponding PTs: In particular if and , we haveAnd we notice that middle two terms of are consecutive Pell numbers and the corresponding PT are all AI-PT.

Theorem 11. *Let , be Pell numbers. Then the PT generated by four Fibonacci type numbers , and is an AI-PT.*

*Proof. *Consider four Fibonacci type numbers and its generated triple . We have seen that are all AI-PT if . Now let be the PT generated by for any . Since , , and , it is not hard to see thatdue to the determinant of in Theorem 10. Thus is an AI-PT.

Like for triples satisfying , it is worth asking for triples satisfying for . For instance, the Fibonacci type numbers , , and produce PTs , , , respectively, where .

Theorem 12. *For any positive integer , there are infinitely many PTs satisfying .*

*Proof. *We assume and . Fibonacci type numbers make a PT , where the difference . Secondly if , then Fibonacci type numbers yield a PT , with .

Now for any , let and . Assume that the PT generated by Fibonacci type numbers satisfies . Then the next PT generated by formsAnd we also haveSo we have infinitely many PTs such that .

If , () then with are , , , . () with are as shown in Table 6.

#### Competing Interests

The author declares that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This work was supported by 2016 HanNam University Research Fund.