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.

Previous Showing 11-12 of 12 results.

A379925 Numbers k for which nonnegative integers x and y exist such that x^2 + y^2 = k and x + y is a square.

Original entry on oeis.org

0, 1, 8, 10, 16, 41, 45, 53, 65, 81, 128, 130, 136, 146, 160, 178, 200, 226, 256, 313, 317, 325, 337, 353, 373, 397, 425, 457, 493, 533, 577, 625, 648, 650, 656, 666, 680, 698, 720, 746, 776, 810, 848, 890, 936, 986, 1040, 1098, 1160, 1201, 1205, 1213, 1225, 1226
Offset: 1

Views

Author

Felix Huber, Jan 25 2025

Keywords

Comments

Numbers k for which exists at least one solution to k = x^2 + (z^2 - x)^2 in integers x and z with x >= 0 and z >= sqrt(2*x).
Subsequence of A001481.

Examples

			10 is in the sequence because 10 = 1^2 + 3^2 and 1 + 3 = 2^2.
81 is in the sequence because 81 = 0^2 + 9^2 and 0 + 9 = 3^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10005 terms.
    A379925:=proc(K)
        local i,j,L;
        L:={};
        for i from 0 to floor(sqrt((K+1)^2)/2) do
            for j from 0 to floor(sqrt((K+1)^2/2-i^2)) do
                if issqr(i+j) then
                    L:=L union {i^2+j^2}
                fi
            od
        od;
        return op(L)
    end proc;
    A379925(1737);
  • PARI
    isok(n)=my(x=0, r=0); while(x<=sqrt(n) && r==0, if(issquare(n-x^2) && issquare(x+sqrtint(n-x^2)), r=1); x++); r; \\ Michel Marcus, Feb 10 2025

Formula

k = m^(4*j) is in the sequence for nonnegative integers m and j (not both 0) because x = 0 and z = m^j is a solution to m^(4*j) = x^2 + (z^2 - x)^2.

A162597 Ordered hypotenuses of primitive Pythagorean triangles, A008846, which are not hypotenuses of non-primitive Pythagorean triangles with any shorter legs.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 137, 145, 149, 157, 173, 181, 185, 193, 197, 221, 229, 233, 241, 257, 265, 269, 277, 281, 293, 313, 317, 325, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421, 433, 445, 449, 457, 461
Offset: 1

Views

Author

Keywords

Comments

Hypotenuses of primitive Pythagorean triangles are shown in A008846 and A020882, and may also be hypotenuses of non-primitive Pythagorean triangles (see A009177, A118882). The sequence contains those hypotenuses of A008846 where in the set of Pythagorean triangles with this hypotenuse the one with the shortest leg is a primitive one.
This ordering first on hypotenuses, then filtering on the shortest legs, and then selecting the primitive triangles removes 125, 169, 205, 289, 305, 425, etc. from A008846.

Examples

			The hypotenuse 25 appears in the triangle 25^2 = 7^2 + 24^2 (primitive) and in the triangle 25^2 = 15^2 + 20^2 (non-primitive). The triangle with the shortest leg (here: 7) is primitive, so 25 is in the sequence.
The hypotenuse 125 appears in the triangles 125^2 = 35^2 + 120^2 (non-primitive), 125^2 = 44^2 + 117^2 (primitive), 125^2 = 75^2 + 100^2 (non-primitive). The case with the shortest leg (here: 35) of these 3 is not primitive, so 125 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Module[{k=1},While[(n-k^2)^(1/2)!=IntegerPart[(n-k^2)^(1/2)],k++; If[2*k^2>=n,k=0;Break[]]];k]; lst1={};Do[If[f[n^2]>0,a=f[n^2];b=(n^2-a^2)^(1/ 2);If[GCD[n,a,b]==1,AppendTo[lst1,n]]],{n,3,6!}];lst1

Extensions

Definition clarified by R. J. Mathar, Aug 14 2009
Previous Showing 11-12 of 12 results.