cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239431 Consider the sequence A235598. Recalling that A235598(n) forms part of a Pythagorean triple, a(n) states its relationship to both a(n-1) and a(n+1). 1 denotes the lesser leg, 2 denotes the greater leg and 3 denotes the hypotenuse. The tens place returns its relationship to the side to its left, a(n-1), and the units place its relationship to the side to its right, a(n+1). a(0)=1.

Original entry on oeis.org

1, 22, 31, 22, 11, 32, 12, 11, 31, 22, 11, 33, 23, 21, 23, 11, 22, 13, 22, 11, 32, 12, 12, 31, 22, 13, 11, 22, 32, 12, 11, 33, 23, 21, 22, 11, 31, 22, 11, 31, 22, 11, 22, 31, 22, 13, 12, 13, 11, 21, 23, 12, 12, 13, 22, 11, 32, 12, 12, 31, 22, 11, 33, 13, 12, 11, 33, 11, 22, 12, 31, 22, 12, 12, 11, 31, 22, 11, 22, 12
Offset: 0

Views

Author

Robert G. Wilson v, Mar 20 2014

Keywords

Comments

Using the data that is available from Lars Blomberg, and the nine possible arrangements, (a), of the three sides, here are those counts for the first x terms not including a(0):
\x. 10 100 1000 10000 100000 1000000 3000000 aprx percentage.
a\
11:. 3. 21. 164. 1502. 13734. 134087. 401166 ~13.3%
12:. 1. 18. 215. 2120. 21457. 208304. 621859 ~20.7%
13:. 0.. 6.. 94.. 921.. 8884.. 86286. 256802. ~8.5%
21:. 0.. 3.. 51.. 550.. 5120.. 51732. 156588. ~5.2%
22:. 3. 22. 207. 2025. 21013. 214855. 646185 ~21.6%
23:. 0.. 5.. 55.. 657.. 6347.. 64480. 194775. ~6.5%
31:. 2. 12.. 95.. 881.. 8697.. 83631. 249413. ~8.3%
32:. 1.. 7.. 51.. 390.. 4219.. 42112. 126410. ~4.2%
33:. 0.. 6.. 68.. 954. 10529. 114513. 346802 ~11.7%

Examples

			a(2)=31 because 5 is the hypotenuse in the 3-4-5 Pythagorean triple, a(n-1) is 4 and 5 is the lesser side in the 5-12-13 Pythagorean triple, a(n+1) is 12.
		

Crossrefs

Programs

  • Mathematica
    lst={ (* the terms from A235598 *) }; g[j_, k_] := Block[{hyp = Sqrt[ j^2 + k^2], lg = Abs@ Sqrt[ j^2 - k^2]}, If[ IntegerQ@ hyp, If[ Min[j, k] == k, 1, 2], If[ Max[j, k] == k, 3, If[lg > k, 1, 2]]]]; f[n_] := Block[{s = Take[lst, {n - 1, n + 1}]}, 10g[ s[[1]], s[[2]] ] + g[ s[[3]], s[[2]] ]]; f[1] = 1; Array[f, 80]