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.

Showing 1-4 of 4 results.

A376208 Numbers k such that 4*k+1 is the hypotenuse of a primitive Pythagorean triangle with an even short leg.

Original entry on oeis.org

4, 7, 9, 13, 16, 18, 21, 25, 27, 31, 34, 36, 43, 46, 49, 51, 55, 57, 60, 64, 66, 70, 73, 76, 81, 87, 91, 93, 94, 99, 100, 102, 111, 112, 114, 121, 123, 126, 127, 133, 136, 141, 144, 148, 150, 156, 157, 160, 165, 169, 171, 172, 175, 181, 183, 186, 189, 196, 198, 202
Offset: 1

Views

Author

Hugo Pfoertner, Sep 20 2024

Keywords

Comments

This sequence is not A094178 \ A375750, because there are hypotenuses for which both kinds of triangles exist. The smallest example occurs for hypotenuse c = 4*a(5) + 1 = 65. The triangle (16, 63, 65) has an even short leg, but there is also the triangle (33, 56, 65) with an odd short leg. Thus, 16 = (65-1)/4 is a term in this sequence and in A375750.
Sorted distinct values of ({A081985} - 1)/4.

Crossrefs

Programs

  • PARI
    is_a376208(n,r=0) = my(c=4*n+1, q=qfbsolve(Qfb(1,0,1), c^2, 3), qd=#q, is=0); for(k=1, qd-1, if(vecmin(abs(q[k]))%2==r && gcd([c,q[k]])==1, is=1; break)); is
    
  • Python
    # for an array from the beginning
    from math import gcd, isqrt
    test_all_k_upto = 202
    A376208, limit = set(), test_all_k_upto * 4 + 1
    for x in range(2,isqrt(limit)+1):
        for y in range(min(((d:=isqrt(2*x**2)-x))-(d%2==x%2), (yy:=isqrt(limit-x**2))-(yy%2==x%2)),0,-2):
            if gcd(x, y) == 1: A376208.add((x**2 + y**2 - 1) // 4)
    print(A376208:=sorted(A376208)) # Karl-Heinz Hofmann, Sep 28 2024
    
  • Python
    # for testing high single terms
    from math import isqrt, gcd
    from sympy import factorint
    def A376208_isok(k):
        c  = k * 4 + 1
        if any([(pf-1) % 4 for pf in factorint(c)]): return False # (Test imported from A008846)
        y2 = c - (x2:=(x:=isqrt(c))**2)
        while 2*x*(y:=isqrt(y2)) < x2-y2:
            if y2 == y**2 and gcd(x, y) == 1: return True
            x -= 1
            y2 = c - (x2:=x**2) # Karl-Heinz Hofmann, Oct 17 2024

A376210 Numbers k for which among all possible Pythagorean triangles with the hypotenuse 4*k+1, the minimum of the lengths of the shorter legs is even.

Original entry on oeis.org

4, 7, 9, 13, 16, 18, 25, 27, 34, 43, 49, 57, 60, 64, 70, 73, 81, 87, 93, 99, 100, 102, 111, 112, 114, 121, 123, 127, 133, 144, 148, 150, 157, 160, 165, 169, 175, 183, 186, 189, 196, 202, 207, 211, 214, 219, 225, 235, 241, 244, 249, 255, 256, 258, 262, 265, 273
Offset: 1

Views

Author

Hugo Pfoertner, Sep 21 2024

Keywords

Examples

			       Hypotenuses                A376210
       4k+1                       |  A376211
   k   A008846                    |  |  A376208
   |   |  Sorted legs [x,y] of    |  |  |  A375750
   |   |  Pythagorean triangles   |  |  |  |  A376209
   1   5  [3,4]                   .  X  .  X  .
   3  13  [5,12]                  .  X  .  X  .
   4  17  [8,15]                  X  .  X  .  .
   6  25  [7,24]                  .  X  .  X  .
   7  29  [20,21]                 X  .  X  .  .
   9  37  [12,35]                 X  .  X  .  .
  10  41  [9,40]                  .  X  .  X  .
  13  53  [28,45]                 X  .  X  .  .
  15  61  [11,60]                 .  X  .  X  .
  16  65  [16,63],[33,56],[39,52] X  .  X  X  X
  18  73  [48,55]                 X  .  X  .  .
  21  85  [13,84],[36,77],[51,68] .  X  X  X  X
		

Crossrefs

({A087937}-1)/4 is a subsequence.

Programs

  • PARI
    is_a376210_1(n,r=0) = my(c=4*n+1, q=qfbsolve(Qfb(1,0,1), c^2, 3), qd=#q); if(qd<2, 0, my(a=vecmin(abs(concat(q))[1..2*(qd-1)]), b=sqrtint(c^2-a^2)); a%2==r && gcd([a,b,c])==1)

A376209 Numbers k for which the hypotenuse z=4*k+1 occurs in more than one primitive Pythagorean triangle, such that 2 distinct triangles (x1,y1,z), (x2,y2,z) with opposite parity of their short legs x1 and x2 exist (xi < yi < z).

Original entry on oeis.org

16, 21, 36, 46, 51, 55, 66, 76, 91, 94, 111, 121, 123, 126, 136, 157, 171, 172, 181, 186, 196, 211, 216, 225, 237, 241, 246, 268, 276, 286, 289, 291, 297, 301, 310, 315, 331, 336, 346, 351, 354, 361, 366, 378, 384, 396, 412, 421, 436, 441, 442, 445, 456, 463, 466
Offset: 1

Views

Author

Hugo Pfoertner, Sep 21 2024

Keywords

Examples

			See A376210.
		

Crossrefs

Intersection of A375750 and A376208.

Programs

  • PARI
    \\ Uses function is_a376208 from A376208
    is(n) = is_a376208(n,0) && is_a376208(n,1)

A376211 Numbers k for which among all possible Pythagorean triangles with the hypotenuse 4*k+1, the minimum of the lengths of the shorter legs is odd.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 22, 24, 28, 36, 37, 39, 45, 46, 48, 55, 58, 66, 67, 69, 78, 79, 84, 88, 91, 94, 97, 105, 108, 115, 120, 130, 135, 136, 139, 142, 153, 154, 163, 168, 171, 172, 177, 190, 192, 193, 199, 205, 210, 213, 220, 231, 232, 234, 237, 238, 252, 253, 267
Offset: 1

Views

Author

Hugo Pfoertner, Sep 21 2024

Keywords

Examples

			See A376210.
		

Crossrefs

({A087938}-1)/4 is a subsequence.

Programs

  • PARI
    \\ uses function is_a376210_1 from A376210
    is_a376210_1(n,1)
Showing 1-4 of 4 results.