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.

User: Juhani Heino

Juhani Heino's wiki page.

Juhani Heino has authored 2 sequences.

A277269 Hypotenuses of Pythagorean triples, generated by a variation of Euclid's formula.

Original entry on oeis.org

5, 10, 13, 17, 10, 25, 26, 29, 34, 41, 37, 20, 15, 26, 61, 50, 53, 58, 65, 74, 85, 65, 34, 73, 20, 89, 50, 113, 82, 85, 30, 97, 106, 39, 130, 145, 101, 52, 109, 58, 25, 68, 149, 82, 181, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 145, 74, 51, 40, 169, 30, 75, 122, 265, 170, 173, 178, 185, 194, 205, 218, 233, 250, 269, 290, 313, 197, 100, 205, 106, 221, 116, 35, 130, 277, 148, 317, 170, 365, 226, 229
Offset: 1

Author

Juhani Heino, Oct 16 2016

Keywords

Comments

Take two positive integers, x > y. As shown in the referenced faux art, you can form a vector using the integers as the coordinates, and repeat that vector and its equal-length normal so that you get exactly to the x-axis. Now you can mirror the pattern: take the same number of normal vectors but in the opposite direction. You get an isosceles triangle and the equal sides represent a Pythagorean triple.
Let s = gcd(x,y). This is the scaling factor -- you divide x and y by it and get coprime x and y. The symmetry axis goes from (0,0) to (xx,xy). The first normal goes from (xx,xy) to (xx+yy,0). The second normal goes from (xx,xy) to (xx-yy,xy+xy). So x^2+y^2 is the hypotenuse of the triangle with catheti x^2-y^2 and 2xy. Scale these with s and you get the triple corresponding to the parameters. In the examples the hypotenuse will be called P(x,y).

Examples

			Triangle with each row r going from P(r+1,1) to P(r+1,r):
P(2,1)=5;
P(3,1)=10, P(3,2)=13;
P(4,1)=17, P(4,2)=2*P(2,1)=10, P(4,3)=25;
P(5,1)=26, P(5,2)=29, P(5,3)=34, P(5,4)=41;
P(6,1)=37, P(6,2)=2*P(3,1)=20, P(6,3)=3*P(2,1)=15, P(6,4)=2*P(3,2)=26, P(6,5)=61;
		

Crossrefs

When results are ordered and doubles removed, we should get A009003.
A222946 is similar but omits non-primitive triples (gives 0 for them).

Programs

  • PARI
    p(x,y) = x^2 + y^2
    out=""
    for (row = 1, 15, for (col = 1, row, s=gcd(row+1, col); out = Str(out, s * p((row+1)/s, col/s),", ") ))
    print(out);

A261491 a(n) = ceiling(2 + sqrt(8*n-4)).

Original entry on oeis.org

4, 6, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29
Offset: 1

Author

Juhani Heino, Aug 21 2015

Keywords

Comments

Conjecture: a(n) = minimal number of stones needed to surround area n in the middle of a Go board (infinite if needed).
The formula was constructed this way: when the area is in a diamond shape with x^2+(x-1)^2 places, it can be surrounded by 4x stones. So, a(1)=4, a(5)=8, a(13)=12 etc.
The positive solution to the quadratic equation 2x^2 - 2x + 1 = n is x = (2 + sqrt(8n-4))/4. And since a(n)=4x, the formula a(n) = 2 + sqrt(8n-4) holds for the positions mentioned. But incredibly also the intermediate results seem to match when the ceiling function is used.
The opposite of this would be an area of 1 X n; it demands the maximal number of stones, a(n) = 2 + 2n.
Equivalently, a(n) is the minimum (cell) perimeter of any polyomino of n cells. - Sean A. Irvine, Oct 17 2020

Examples

			Start with the 5-cell area that is occupied by 0's and surrounded by stones 1..8. Add those surrounding stones to the area, one by one. At points 1, 2, 4 and 6, the number of surrounding stones is increased; elsewhere, it is not.
Next, do the same with stones A..L. At points A, C, F and I, the number of surrounding stones is increased; elsewhere, it is not.
___D___
__A5C__
_B104E_
G30007J
_F206I_
__H8K__
___L___
		

Crossrefs

Cf. A001971.

Programs

Formula

a(n) = ceiling(2 + sqrt(8*n-4)).
For n > 2, a(n) - a(n-1) = 1 if n is of the form 2*(k^2+k+1), 2*k^2 + 1 or (k^2+k)/2 + 1, otherwise 0. - Jianing Song, Aug 10 2021