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-10 of 12 results. Next

A096907 Primitive Pythagorean Quadruples a^2+b^2+c^2=d^2, 0

Original entry on oeis.org

1, 2, 4, 1, 6, 2, 3, 2, 2, 8, 1, 6, 6, 1, 8, 4, 4, 4, 6, 3, 3, 12, 9, 7, 10, 2, 2, 2, 12, 11, 3, 14, 6, 6, 5, 17, 8, 7, 4, 8, 4, 1, 15, 6, 1, 6, 8, 12, 3, 3, 19, 14, 2, 13, 2, 10, 23, 12, 9, 4, 4, 18, 7, 9, 2, 6, 2, 20, 4, 16, 13, 8, 5, 18, 18, 6, 11, 2, 6, 23, 12, 9, 4, 15, 12, 4, 22, 14, 1, 14
Offset: 1

Views

Author

Ray Chandler, Aug 15 2004

Keywords

Crossrefs

Programs

  • Mathematica
    mx = 50; res = {}; Do[If[GCD[b, c, d] > 1, Continue[]]; If[IntegerQ[a = Sqrt[d^2 - b^2 - c^2]] && a > 0 && a <= b, AppendTo[res, {a, b, c, d}]], {d, mx}, {c, d}, {b, c}]; res[[All, 1]] (* Ivan Neretin, May 24 2015 *)

A096909 Primitive Pythagorean Quadruples a^2+b^2+c^2=d^2, 0

Original entry on oeis.org

2, 6, 7, 8, 7, 9, 12, 11, 14, 12, 12, 15, 17, 18, 16, 16, 19, 20, 18, 18, 22, 16, 20, 22, 23, 23, 25, 26, 21, 24, 24, 21, 22, 27, 30, 20, 25, 28, 28, 31, 32, 32, 26, 30, 30, 33, 27, 28, 28, 36, 26, 29, 29, 34, 34, 35, 24, 31, 32, 33, 39, 30, 30, 38, 39, 42, 42, 29, 35, 37, 40
Offset: 1

Views

Author

Ray Chandler, Aug 15 2004

Keywords

Crossrefs

Programs

  • Mathematica
    mx = 50; res = {}; Do[If[GCD[b, c, d] > 1, Continue[]]; If[IntegerQ[a = Sqrt[d^2 - b^2 - c^2]] && a > 0 && a <= b, AppendTo[res, {a, b, c, d}]], {d, mx}, {c, d}, {b, c}]; res[[All, 3]] (* Ivan Neretin, May 24 2015 *)

A096908 Primitive Pythagorean Quadruples a^2+b^2+c^2=d^2, 0

Original entry on oeis.org

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

Views

Author

Ray Chandler, Aug 15 2004

Keywords

Crossrefs

Programs

  • Mathematica
    mx = 50; res = {}; Do[If[GCD[b, c, d] > 1, Continue[]]; If[IntegerQ[a = Sqrt[d^2 - b^2 - c^2]] && a > 0 && a <= b, AppendTo[res, {a, b, c, d}]], {d, mx}, {c, d}, {b, c}]; res[[All, 2]] (* Ivan Neretin, May 24 2015 *)

A225207 Number of primitive Pythagorean quadruples (a, b, c, d) with d < 10^n.

Original entry on oeis.org

4, 347, 34163, 3412143, 341175325, 34117055318, 3411700692939, 341170025540426, 34117002022924247
Offset: 1

Views

Author

Arkadiusz Wesolowski, May 01 2013

Keywords

Comments

a(n) ~ (1+G)*A225206(n)/Pi, where G is Catalan's constant (A006752).

Examples

			a(1) = 4 because there are four primitive solutions (a, b, c, d) as follows: (1, 2, 2, 3), (2, 3, 6, 7), (1, 4, 8, 9), (4, 4, 7, 9) with d < 10.
		

Crossrefs

Extensions

a(4) from Giovanni Resta, May 01 2013
a(5)-a(9) from Max Alekseyev, Feb 28 2023

A385356 Numbers x such that there exist two integers 00 such that sigma(x)^2 = sigma(y)^2 = x^2 + y^2 + z^2.

Original entry on oeis.org

2, 40, 164, 196, 224, 1120, 3040, 13440, 22932, 44200, 76160, 90848, 91720, 174592, 530200, 619840, 687184, 872960, 1686400, 1767040, 1807120, 1927680, 1990912, 2154880, 3653760, 4286880, 5637632, 5759680, 6442128, 8225280, 8943800, 9264320, 9465600, 9694080
Offset: 1

Views

Author

S. I. Dimitrov, Jun 26 2025

Keywords

Comments

The numbers x, y and z form a sigma-quadratic triple. See Dimitrov link.

Examples

			(40, 58, 56) is such a triple because sigma(40)^2 = sigma(58)^2 = 90^2 = 40^2 + 58^2 + 56^2.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import divisor_sigma
    from sympy.ntheory.primetest import is_square
    def A385356_gen(startvalue=1): # generator of terms >= startvalue
        for x in count(max(startvalue,1)):
            sx, x2 = int(divisor_sigma(x)), x**2
            sx2 = sx**2
            if sx2>x2:
                for y in count(x):
                    if (k:=sx2-x2-y**2)<=0:
                        break
                    if is_square(k) and sx==divisor_sigma(y):
                        yield x
                        break
    A385356_list = list(islice(A385356_gen(),8)) # Chai Wah Wu, Jul 02 2025

Extensions

Data corrected by David A. Corneth, Jun 27 2025
a(18)-a(34) from Chai Wah Wu, Jul 02 2025

A385525 Consider the graph whose vertices are the points of the n-dimensional cubic lattice with points connected by all integer-length diagonals that traverse all n dimensions and do not intersect intermediate points. a(n) is the total length of the shortest possible closed walk in this graph via noncongruent diagonals of the same length.

Original entry on oeis.org

327080, 84, 52, 32, 18, 24, 24, 24, 24, 24, 18, 24, 24, 24, 24, 24, 24, 24, 24, 30, 24, 30, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 30, 36, 36, 30, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, 36, 36, 40, 36, 40, 42
Offset: 2

Views

Author

Charles L. Hohn, Jul 30 2025

Keywords

Comments

Other than a(2) whose walk is comprised of 8 diagonal segments, all known terms are produced by 3- or 4-segment walks, including some with examples of both. It is conjectured that this holds true for all n >= 3.
For n = 2, the walk segments are the hypotenuses of noncongruent primitive Pythagorean triangles.
The offset is 2, because even though the graph could be defined in dimension 1 (the vertices would be the points of Z, with each point connected to its two neighbors), it would not contain any closed paths.
Removing the constraint that the diagonal segments must all have the same length gives A386251. All such walks in 2 dimensions, by diagonal segment length rather than total walk length, gives A386671.

Examples

			a(2) = 327080 because [3636, 40723] + [8844, 39917] + [11603, -39204] + [38076, -14893] + [-37523, -16236] + [35844, -19667] + [-34387, -22116] + [-26093, 31476] = [0, 0] and 8 segments * length 40885 = 327080, which is the smallest example for n = 2.
a(3) = 84: [16, 11, 8] + [-13, 4, 16] + [-8, -19, -4] + [5, 4, -20] = [0, 0, 0] and 4 * 21 = 84.
a(4) = 52: [8, 8, 5, 4] + [-9, -6, 6, 4] + [-7, -4, -10, 2] + [8, 2, -1, -10] = [0, 0, 0, 0] and 4 * 13 = 52.
		

Crossrefs

Cf. A020882 (diagonals in 2 dimensions), A096910 (diagonals in 3 dimensions).

A225771 Numbers that are positive integer divisors of 1 + 2*x^2 where x is a positive integer.

Original entry on oeis.org

1, 3, 9, 11, 17, 19, 27, 33, 41, 43, 51, 57, 59, 67, 73, 81, 83, 89, 97, 99, 107, 113, 121, 123, 129, 131, 137, 139, 153, 163, 171, 177, 179, 187, 193, 201, 209, 211, 219, 227, 233, 241, 243, 249, 251, 257, 267, 281, 283, 289, 291, 297, 307, 313, 321, 323
Offset: 1

Views

Author

Michael Somos, Jul 26 2013

Keywords

Comments

This sequence is case k=2, A008784 is case k=1, A004613 is case k=4 of divisors of 1 + k*x^2.
From Peter M. Chema, May 08 2017 (Start): Also gives the body diagonals of all primitive Pythagorean quadruples that define square prisms, with sides [b, b, and c] and diagonal d, such that 2*b^2 + c^2 = d^2. E.g., sides [2, 2, 1], diagonal 3 = a(2); [4, 4, 7], 9 = a(3); [6, 6, 7], 11 = a(4); [12, 12, 1], 17 = a(5); [6, 6, 17] 19 = a(6); [10, 10, 23], 27 = a(7); [20, 20, 17], 33 = a(8); [24, 24, 23], 41 = a(9)... (a subsequence of A096910) (End)
Editorial note: The above comment would be better expressed by talking about right tetrahedra (also called trirectangular tetrahedra), that is, tetrahedra with vertices (b 0 0), (0 c 0), (0 0 d) (here b=c). These are the correct generalizations of Pythagorean triangles. N. J. A. Sloane, May 08 2017
From Frank M Jackson, May 23 2017: (Start)
Starting at a(2)=3, this gives the shortest side of a primitive Heronian triangle whose perimeter is 4 times its shortest side. Aka a primitive integer Roberts triangle (see Buchholz link).
Also odd and primitive terms generated by x^2 + 2y^2 with x>0 and y>0.
Also integers with all prime divisors congruent to 1 or 3 (mod 8). (End)

Crossrefs

Programs

  • Mathematica
    Select[Range[323], False =!= Reduce[1 + 2*x^2 == # y , {x, y}, Integers] &] (* Giovanni Resta, Jul 28 2013 *)
    Select[Range[323], OddQ[#]&&Intersection[{5, 7}, Mod[Divisors[#], 8]]=={} &] (* Frank M Jackson, May 23 2017 *)
  • PARI
    {isa(n) = if( n<2, n==1, for( k=1, n\2, if( (1 + 2*k^2)%n == 0, return(1))))} /* Michael Somos, Jul 28 2013 */

Formula

a(n) integers whose prime divisors are congruent to 1 or 3 (mod 8). - Carmine Suriano, Jan 09 2015; corrected by Frank M Jackson, May 23 2017

A386251 Consider the graph whose vertices are the points of the n-dimensional cubic lattice with points connected by all integer-length diagonals that traverse all n dimensions and do not intersect intermediate points. a(n) is the total length of the shortest possible closed walk in this graph via noncongruent diagonals.

Original entry on oeis.org

60, 28, 20, 22, 18, 16, 18, 18, 16, 18, 18, 18, 20, 20, 18, 20, 20, 20, 22, 22, 22, 24, 24, 22, 24, 24, 24, 26, 24, 24, 26, 26, 26, 26, 26, 26, 28, 28, 28, 28, 30, 28, 30, 30, 30, 30, 30, 30, 32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 34, 34, 36, 34, 34, 36, 36
Offset: 2

Views

Author

Charles L. Hohn, Jul 16 2025

Keywords

Comments

It is provable that all such walks must be even in total length. It is also provable that 3-segment closed walks are impossible for n < 6, and conjectured that a(n) for all n >= 6 are produced by 3-segment walks.
For n = 2, the walk segments are the hypotenuses of noncongruent primitive Pythagorean triangles.
The offset is 2, because even though the graph could be defined in dimension 1 (the vertices would be the points of Z, with each point connected to its two neighbors), it would not contain any closed paths.
Adding a constraint that the diagonal segments must all have the same length gives A385525.

Examples

			a(2) = 60 because [3, 4] + [5, 12] + [-15, 8] + [7, -24] = [0, 0] and segment lengths 5 + 13 + 17 + 25 = 60, which is the smallest example for n = 2.
a(3) = 28: [2, 2, 1] + [-3, -2, -6] + [-7, 4, 4] + [8, -4, 1] = [0, 0, 0] and 3 + 7 + 9 + 9 = 28.
a(4) = 20: [1, 1, 1, 1] + [-1, -2, -2, -4] + [-5, -3, -1, 1] + [5, 4, 2, 2] = [0, 0, 0, 0] and 2 + 5 + 6 + 7 = 20.
		

Crossrefs

Cf. A385525.
Cf. A020882 (diagonals in 2 dimensions), A096910 (diagonals in 3 dimensions).

A360946 Number of Pythagorean quadruples with inradius n.

Original entry on oeis.org

1, 3, 6, 10, 9, 19, 16, 25, 29, 27, 27, 56, 31, 51, 49, 61, 42, 91, 52, 71, 89, 86, 63, 142, 64, 95, 116, 132, 83, 153, 90, 144, 149, 133, 108, 238, 108, 162, 169, 171, 122, 284, 130, 219, 200, 196, 145, 340, 174, 201, 231, 239, 164, 364, 176, 314, 278, 256, 190, 399, 195, 281, 360, 330
Offset: 1

Views

Author

Keywords

Comments

A Pythagorean quadruple is a quadruple (a,b,c,d) of positive integers such that a^2 + b^2 + c^2 = d^2 with a <= b <= c. Its inradius is (a+b+c-d)/2, which is a positive integer.
For every positive integer n, there is at least one Pythagorean quadruple with inradius n.

Examples

			For n=1 the a(1)=1 solution is (1,2,2,3).
For n=2 the a(2)=3 solutions are (1,4,8,9), (2,3,6,7) and (2,4,4,6).
For n=3 the a(3)=6 solutions are (1,6,18,19), (2,5,14,15), (2,6,9,11), (3,4,12,13), (3,6,6,9) and (4,4,7,9).
		

References

  • J. M. Blanco Casado, J. M. Sánchez Muñoz, and M. A. Pérez García-Ortega, El Libro de las Ternas Pitagóricas, Preprint 2023.

Crossrefs

Programs

  • Mathematica
    n=50;
    div={};suc={};A={};
    Do[A=Join[A,{Range[1,(1+1/Sqrt[3])q]}],{q,1,n}];
    Do[suc=Join[suc,{Length[div]}];div={};For [i=1,i<=Length[Extract[A,q]],i++,div=Join[div,Intersection[Divisors[q^2+(Extract[Extract[A,q],i]-q)^2],Range[2(Extract[Extract[A,q],i]-q),Sqrt[q^2+(Extract[Extract[A,q],i]-q)^2]]]]],{q,1,n}];suc=Rest[Join[suc,{Length[div]}]];matriz={{"q"," ","cuaternas"}};For[j=1,j<=n,j++,matriz=Join[matriz,{{j," ",Extract[suc,j]}}]];MatrixForm[Transpose[matriz]]

A375098 Diagonals of a Euclidian solid such that there exists a Pythagorean quadruple d^2=a^2+b^2+c^2 that is more cube-like than any prior value of d.

Original entry on oeis.org

3, 9, 11, 41, 123, 153, 571, 1713, 2131, 7953, 23859, 29681, 110771, 332313, 413403, 1542841, 4628523, 5757961, 21489003, 64467009, 80198051, 299303201, 897909603, 1117014753, 4168755811, 12506267433, 15558008491, 58063278153, 174189834459, 216695104121
Offset: 1

Views

Author

Christian N. K. Anderson, Mark K. Transtrum, and David D. Allred, Jul 29 2024

Keywords

Comments

To determine how "cube-like" a Pythagorean quad is, we use the quotient C/(C-a*b*c) where C is the volume of an ideal cube for a given diagonal d, C=(d/sqrt(3))^3. A ratio of 100 indicates that the best {a,b,c} combination creates a solid 1 part per 100 smaller than the ideal cube volume.
Contains all the terms in A001835 and A079935 except the leading 1s. For such a term b(m) contained in a(n) from those sequences, 2*b(m) will tie the current record, while 3*b(m) will tie but will also break the current record exactly half the time and thus appear as a(n+1). This means round((2+sqrt(3))*b(m)) will also be in the sequence as either a(n+1) or a(n+2) if a better quad for 3*b(n) was found.
The constant (2+sqrt(3)) follows from the recurrence relationship b(n)=4*b(n-1)-b(n-2). The constant can be represented as the continued fraction 3,1,2,1,2,1,2,1,2,.... The equivalents for the 2D case (A001653) are 3+2*sqrt(2) and {5,1,4,1,4,1,4,1,4,...}.
We conjecture this method provides complete solutions. This was confirmed directly by brute-force testing up to 1e7 (optimized using the sum-of-two-squares theorem for a given d^2-a^2 = b^2 + c^2; see link below).

Examples

			3 is in the sequence because 3^2=1^2+2^2+2^2 is the smallest Pythagorean quad, with an error of one part in 4.344.
6 is NOT in the sequence because {6,2,4,4} is the most cube-like Pythagorean quad, but only ties the previous record without breaking it.
7 is NOT in the sequence because the most cube-like quad {7,2,3,6} has an error of one part in 2.2, worse than that for d=3.
9 is in the sequence NOT because of {9,3,6,6} which ties the previous record, but because {9,4,4,7} improves on the previous record with an error of one part in 4.958.
		

Crossrefs

Cf. A096907, A096908, A096909, A096910 for lists of a, b, c, and d of the 10,000 first Pythgorean quads, sorted by ascending d.
Contains all terms in A001835 and A079935 except the leading 1s.
Cf. A001653: The 2D equivalent of this sequence (i.e., right triangle whose legs are closest to equal)

Programs

  • Mathematica
    (* An efficient program is provided in the links section. *)

Formula

For n == 0 (mod 3), a(n) = 4*a(n-2)-a(n-3) OR a(n) = floor(a(n-1)*(2+sqrt(3))/3),
For n == 1 (mod 3), a(n) = 4*a(n-2)-a(n-1) OR a(n) = floor(a(n-1)*(2+sqrt(3))),
For n == 2 (mod 3), a(n) = 3*a(n-1).
Showing 1-10 of 12 results. Next