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 54 results. Next

A141614 First differences of A008846.

Original entry on oeis.org

8, 4, 8, 4, 8, 4, 12, 8, 4, 8, 12, 4, 8, 4, 8, 4, 12, 12, 8, 4, 8, 12, 4, 8, 4, 8, 4, 8, 16, 8, 4, 8, 16, 8, 4, 8, 4, 8, 4, 12, 8, 4, 8, 12, 12, 4, 12, 8, 4, 12, 8, 4, 8, 12, 4, 8, 12, 4, 8, 4, 20, 4, 8, 12, 4, 12, 12, 8, 4, 12, 8, 4, 8, 16, 8, 12, 4, 8, 4, 12, 12, 8, 12, 4, 8, 4, 8, 4, 8, 16, 8, 12, 12, 4, 8, 4, 12, 8, 4, 12
Offset: 1

Views

Author

Paul Curtz, Aug 23 2008

Keywords

Comments

Differences between Hypotenuses of primitive Pythagorean triangles.

Crossrefs

Formula

a(n)=A008846(n+1)-A008846(n).

Extensions

Offset set to 1 and extended by R. J. Mathar, Sep 07 2009

A072289 One eighty-fourth the area of primitive Pythagorean triangles with (increasing) square hypotenuses (precisely those of A008846).

Original entry on oeis.org

1, 85, 230, 1054, 205, 5405, 6510, 18615, 27335, 44556, 45034, 22660, 89531, 152889, 181220, 53430, 221595, 304265, 246380, 720291, 360910, 595884, 811954, 1444915, 1362295, 40630, 2504645, 1304445, 2385474, 3311396, 3647810, 2420665, 1641809
Offset: 1

Views

Author

Lekraj Beedassy, Jul 11 2002

Keywords

Comments

For Pythagorean triples (x, y, z) satisfying x^2 + y^2 = z^2, we have 3 and 4 dividing either of x or y and 7 dividing x, y or (x^2 - y^2), so that 3*4*7 always divide x*y*(x^2 - y^2); if (x, y) be themselves the generators of another Pythagorean triple, (x^2 - y^2, 2*x*y, x^2 + y^2=z^2), the corresponding primitive Pythagorean triangle has area x*y*(x^2 - y^2) and is hence divisible by 84.

Crossrefs

Cf. A020882.

Extensions

Corrected and extended by Ray Chandler, Oct 28 2003
Sorted by increasing square hypotenuse, then increasing area by Sean A. Irvine, Sep 20 2024

A141624 A008846 (5, 13, 17, 25, ...) - A002145 (3, 7, 11, 19, ...).

Original entry on oeis.org

2, 6, 6, 6, 6, 6, -2, 6, 2, -2, 2, 6, 6, -6, -6, -18, -18, -14, -14, -18, -18, -22
Offset: 0

Views

Author

Paul Curtz, Aug 24 2008

Keywords

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

A020882 Ordered hypotenuses (with multiplicity) of primitive Pythagorean triangles.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 65, 73, 85, 85, 89, 97, 101, 109, 113, 125, 137, 145, 145, 149, 157, 169, 173, 181, 185, 185, 193, 197, 205, 205, 221, 221, 229, 233, 241, 257, 265, 265, 269, 277, 281, 289, 293, 305, 305, 313, 317, 325, 325, 337, 349, 353, 365, 365
Offset: 1

Views

Author

Keywords

Comments

The largest member 'c' of the primitive Pythagorean triples (a,b,c) ordered by increasing c.
These are numbers of the form a^2 + b^2 where gcd(b-a, 2*a*b)=1. - M. F. Hasler, Apr 04 2010
Equivalently, numbers of the form a^2 + b^2 where gcd(a,b) = 1 and a and b are not both odd. To avoid double-counting, require a > b > 0. - Franklin T. Adams-Watters, Mar 15 2015
The density of such points in a circle with radius squared = a(n) is ~ Pi * a(n). Restricting to a > b > 0 reduces this by a factor of 1/8; requiring gcd(a,b)=1 provides a factor of 6/Pi^2; and a, b not both odd is a factor of 2/3. (2/3, not 3/4, because the case a, b both even has already been eliminated.) Multiplying, a(n) * Pi * 1/8 * 6/Pi^2 * 2/3 is a(n) / (2 * Pi). But n is approximately this number of points, so a(n) ~ 2 * Pi * n. Conjectured by David W. Wilson, proof by Franklin T. Adams-Watters, Mar 15 2015
Permutations are in A094194, A088511, A121727, A119321, A113482 and A081804. Entries of A024409 occur here more than once. - R. J. Mathar, Apr 12 2010
The distinct terms of this sequence seem to constitute a subset of the sequence defined as a(n) = (-1)^n + 6*n for n >= 1. - Alexander R. Povolotsky, Mar 15 2015
The terms in this sequence are given by f(m,n) = m^2 + n^2 where m and n are any two integers satisfying m > 1, n < m, the greatest common divisor of m and n is 1, and m and n are both not odd. E.g., f(m,n) = f(2,1) = 2^2 + 1^2 = 4 + 1 = 5. - Agola Kisira Odero, Apr 29 2016

References

  • M. de Frénicle, "Méthode pour trouver la solutions des problèmes par les exclusions", in: "Divers ouvrages de mathématiques et de physique, par Messieurs de l'Académie royale des sciences", Paris, 1693, pp 1-44.

Crossrefs

Cf. A004613, A008846, A020883-A020886, A046086, A046087, A222946 (as a number triangle).

Programs

  • Mathematica
    t={};Do[Do[a=Sqrt[c^2-b^2];If[a>b,Break[]];If[IntegerQ[a]&&GCD[a,b,c]==1,AppendTo[t,c]],{b,c-1,3,-1}],{c,400}];t (* Vladimir Joseph Stephan Orlovsky, Jan 21 2012 *)
    f[c_] := Block[{a = 1, b, lst = {}}, While[b = Sqrt[c^2 - a^2]; a < b, If[ IntegerQ@ b && GCD[a, b, c] == 1, AppendTo[lst, a]]; a++]; lst]
    Join @@ Table[ConstantArray[n, Length@f@n], {n, 1, 400, 4}] (* Robert G. Wilson v, Mar 16 2014; corrected by Andrey Zabolotskiy, Oct 31 2019 *)
  • PARI
    {my( c=0, new=[]); for( b=1,99, for( a=1, b-1, gcd(b-a,2*a*b) == 1 && new=concat(new,a^2+b^2)); new=vecsort(new); for( j=1,#new, new[j] > (b+1)^2 & (new=vecextract(new, Str(j,".."))) & next(2); write("b020882.txt",c++," "new[j])); new=[])} \\ M. F. Hasler, Apr 04 2010

Formula

a(n) = sqrt((A120681(n)^2 + A120682(n)^2)/2). - Lekraj Beedassy, Jun 24 2006
a(n) = sqrt(A046086(n)^2 + A046087(n)^2). - Zak Seidov, Apr 12 2011
a(n) ~ 2*Pi*n. - observation by David W. Wilson, proved by Franklin T. Adams-Watters (cf. comments), Mar 15 2015
a(n) = sqrt(A180620(n)^2 + A231100(n)^2). - Rui Lin, Oct 09 2019

Extensions

Edited by N. J. A. Sloane, May 15 2010

A009003 Hypotenuse numbers (squares are sums of 2 nonzero squares).

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 51, 52, 53, 55, 58, 60, 61, 65, 68, 70, 73, 74, 75, 78, 80, 82, 85, 87, 89, 90, 91, 95, 97, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 125, 130, 135, 136, 137, 140
Offset: 1

Views

Author

Keywords

Comments

Multiples of Pythagorean primes A002144 or of primitive Pythagorean triangles' hypotenuses A008846. - Lekraj Beedassy, Nov 12 2003
This is exactly the sequence of positive integers with at least one prime divisor of the form 4k + 1. Compare A072592. - John W. Layman, Mar 12 2008 and Franklin T. Adams-Watters, Apr 26 2009
Circumradius R of the triangles such that the area, the sides and R are integers. - Michel Lagneau, Mar 03 2012
The 2 squares summing to a(n)^2 cannot be equal because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 10 2013
Closed under multiplication. The primitive elements are those with exactly one prime divisor of the form 4k + 1 with multiplicity one, which are also those for which there exists a unique integer triangle = A084645. - Jean-Christophe Hervé, Nov 11 2013
a(n) are numbers whose square is the mean of two distinct nonzero squares. This creates 1-to-1 mapping between a Pythagorean triple and a "Mean" triple. If the Pythagorean triple is written, abnormally, as {j, k, h} where j^2 +(j+k)^2 = h^2, and h = a(n), then the corresponding "Mean" triple with the same h is {k, 2j, h} where (k^2 + (k+2j)^2)/2 = h^2. For example for h = 5, the Pythagorean triple is {3, 1, 5} and the Mean triple is {1, 6, 5}. - Richard R. Forberg, Mar 01 2015
Integral side lengths of rhombuses with integral diagonals p and q (therefore also with integral areas A because A = pq/2 is some multiple of 24). No such rhombuses are squares. - Rick L. Shepherd, Apr 09 2017
Conjecture: these are bases n in which exists an n-adic integer x satisfying x^5 = x, and 5 is the smallest k>1 such that x^k =x (so x^2, x^3 and x^4 are not x). Example: the 10-adic integer x = ...499879186432 (A120817) satisfies x^5 = x, and x^2, x^3, and x^4 are not x, so 10 is in this sequence. See also A120817, A210850 and A331548. - Patrick A. Thomas, Mar 01 2020
Didactic comment: When students solve a quadratic equation a*x^2 + b*x + c = 0 (a, b, c: integers) with the solution formula, they often make the mistake of calculating b^2 + 4*a*c instead of b^2 - 4*a*c (especially if a or c is negative). If the root then turns out to be an integer, they feel safe. This sequence lists the absolute values of b for which this error can happen. Reasoning: With p^2 = b^2 - 4*a*c and q^2 = b^2 + 4*a*c it follows by addition immediately that p^2 + q^2 = 2*b^2. If 4*a*c < 0, let p = x + y and q = x - y. If 4*a*c > 0, let p = x - y and q = x + y. In both cases follows that y^2 + x^2 = b^2. So every Pythagorean triple gives an absolute value of b for which this error can occur. Example: From (y, x, b) = (3, 4, 5) follows (q^2, b^2, p^2) = (1, 25, 49) or (p^2, b^2, q^2) = (1, 25, 49) with abs(4*a*c) = 24. - Felix Huber, Jul 22 2023
Conjecture: Numbers m such that the limit: Limit_{s->1} zeta(s)*Sum_{k=1..m} [k|m]*A008683(k)*(i^k)/(k^(s - 1)) exists, which is equivalent to numbers m such that abs(Sum_{k=1..m} [k|m]*A008683(k)*(i^k)) = 0. - Mats Granvik, Jul 06 2024

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.

Crossrefs

Cf. A000404 (sums of 2 squares), A004431 (sums of 2 distinct squares), A009000 (hypotenuse numbers with repetition), A072592, A004613, A187811.
Complement of A004144. Primes in this sequence give A002144. Same as A146984 (integer contraharmonic means) as sets - see Pahikkala 2010, Theorem 5.
Cf. A083025, A084645 (primitive elements), A084646, A084647, A084648, A084649, A006339.

Programs

  • Haskell
    import Data.List (findIndices)
    a009003 n = a009003_list !! (n-1)
    a009003_list = map (+ 1) $ findIndices (> 0) a005089_list
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Maple
    isA009003 := proc(n)
        local p;
        for p in numtheory[factorset](n) do
            if modp(p,4) = 1 then
                return true;
            end if;
        end do:
        false;
    end proc:
    for n from 1 to 200 do
        if isA009003(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Nov 17 2014
  • 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]; A009003 = {}; Do[If[f[n^2] > 0, AppendTo[A009003, n]], {n, 3, 100}]; A009003 (* Vladimir Joseph Stephan Orlovsky, Jun 15 2009 *)
    Select[Range[200], Length[PowersRepresentations[#^2, 2, 2]] > 1 &] (* Alonso del Arte, Feb 11 2014 *)
  • PARI
    is_A009003(n)=setsearch(Set(factor(n)[,1]%4),1)  \\ M. F. Hasler, May 27 2012
    
  • PARI
    list(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); for(i=5,lim, if(u[i], listput(v,i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A009003_gen(): # generator of terms
        return filter(lambda n:any(map(lambda p: p % 4 == 1,primefactors(n))),count(1))
    A009003_list = list(islice(A009003_gen(),20)) # Chai Wah Wu, Jun 22 2022

Formula

A005089(a(n)) > 0. - Reinhard Zumkeller, Jan 07 2013
a(n) ~ n. - Charles R Greathouse IV, Jan 13 2022
a(n) = sqrt(n-th square in A000404), where A000404 lists the sums of two nonzero squares. - M. F. Hasler, Jun 20 2025

Extensions

Definition edited by Jean-Christophe Hervé, Nov 10 2013

A004613 Numbers that are divisible only by primes congruent to 1 mod 4.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also gives solutions z to x^2+y^2=z^4 with gcd(x,y,z)=1 and x,y,z positive. - John Sillcox (johnsillcox(AT)hotmail.com), Feb 20 2004
A065338(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2010
Product_{k=1..A001221(a(n))} A079260(A027748(a(n),k)) = 1. - Reinhard Zumkeller, Jan 07 2013
A062327(a(n)) = A000005(a(n))^2. (These are the only numbers that satisfy this equation.) - Benedikt Otten, May 22 2013
Numbers that are positive integer divisors of 1 + 4*x^2 where x is a positive integer. - Michael Somos, Jul 26 2013
Numbers k such that there is a "knight's move" of Euclidean distance sqrt(k) which allows the whole of the 2D lattice to be reached. For example, a knight which travels 4 units in any direction and then 1 unit at right angles to the first direction moves a distance sqrt(17) for each move. This knight can reach every square of an infinite chessboard.
Also 1/7 of the area of the n-th largest octagon with angles 3*Pi/4, along the perimeter of which there are only 8 nodes of the square lattice - at its vertices. - Alexander M. Domashenko, Feb 21 2024
Sequence closed under multiplication. Odd values of A031396 and their powers. These are the only numbers m that satisfy the Pell equation (k*x)^2 - D*(m*y)^2 = -1. - Klaus Purath, May 12 2025

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.

Crossrefs

Subsequence of A000404; A002144 is a subsequence. Essentially same as A008846.
Cf. A004614.

Programs

  • Haskell
    a004613 n = a004613_list !! (n-1)
    a004613_list = filter (all (== 1) . map a079260 . a027748_row) [1..]
    -- Reinhard Zumkeller, Jan 07 2013
  • Magma
    [n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 4 eq 1}]; // Vincenzo Librandi, Aug 21 2012
    
  • Maple
    isA004613 := proc(n)
        local p;
        for p in numtheory[factorset](n) do
            if modp(p,4) <> 1 then
                return false;
            end if;
        end do:
        true;
    end proc:
    for n from 1 to 200 do
        if isA004613(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Nov 17 2014
    # second Maple program:
    q:= n-> andmap(i-> irem(i[1], 4)=1, ifactors(n)[2]):
    select(q, [$1..500])[];  # Alois P. Heinz, Jan 13 2024
  • Mathematica
    ok[1] = True; ok[n_] := And @@ (Mod[#, 4] == 1 &) /@ FactorInteger[n][[All, 1]]; Select[Range[421], ok] (* Jean-François Alcover, May 05 2011 *)
    Select[Range[500],Union[Mod[#,4]&/@(FactorInteger[#][[All,1]])]=={1}&] (* Harvey P. Dale, Mar 08 2017 *)
  • PARI
    for(n=1,1000,if(sumdiv(n,d,isprime(d)*if((d-1)%4,1,0))==0,print1(n,",")))
    
  • PARI
    is(n)=n%4==1 && factorback(factor(n)[,1]%4)==1 \\ Charles R Greathouse IV, Sep 19 2016
    

Formula

Numbers of the form x^2 + y^2 where x is even, y is odd and gcd(x, y) = 1.

A004611 Divisible only by primes congruent to 1 mod 3.

Original entry on oeis.org

1, 7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 97, 103, 109, 127, 133, 139, 151, 157, 163, 169, 181, 193, 199, 211, 217, 223, 229, 241, 247, 259, 271, 277, 283, 301, 307, 313, 331, 337, 343, 349, 361, 367, 373, 379, 397, 403, 409, 421, 427, 433, 439, 457
Offset: 1

Views

Author

Keywords

Comments

In other words, if a prime p divides n, then p == 1 mod 3.
Equivalently, products of primes == 1 (mod 6), products of elements of A002476.
Positive integers n such that n+d+1 is divisible by 3 for all divisors d of n. For example, a(13)=91 since 91=7*13, 91+1+1=93=3*31, 91+7+1=99=9*11, 91+13+1=105=3*7*5, 91+91+1=183=3*61. The only prime p such that x+d+1 is divisible by p for all divisors d of x is p=3. The sequence consists of 1 and all integers whose prime divisors are of the form 6k+1. - Walter Kehowski, Aug 09 2006
Also z such that z^2 = x^2 + x*y + y^2 and gcd(x,y,z) = 1. - Frank M Jackson, Jul 30 2013
From Jean-Christophe Hervé, Nov 24 2013: (Start)
Apart from the first term (for all in this comment), this sequence is the analog of A008846 (hypotenuses of primitive Pythagorean triangles) for triangles with integer sides and a 120-degree angle: a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles.
Not only the square of these numbers is equal to x^2 + xy + y^2 with x and y > 0, but the numbers themselves also are; the sequence starting at n=2 is then a subsequence of A024606.
(End)
Numbers n such that 3/n cannot be written as the sum of 2 unit fractions. - Carl Schildkraut, Jul 19 2016
a(n), n>1, is the sequence of lengths of the middle side b of the primitive triangles such that A < B < C with an angle B = 60 degrees (A335895). Compare with comment of Nov 24 2013 where a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles that have an angle = 120 degrees. - Bernard Schott, Mar 29 2021

Crossrefs

Multiplicative closure of A002476.

Programs

  • Magma
    [n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 3 eq 1}]; // Vincenzo Librandi, Aug 21 2012
    
  • Maple
    with(numtheory): for n from 1 to 1801 by 6 do it1 := ifactors(n)[2]: it2 := 1: for i from 1 to nops(it1) do if it1[i][1] mod 6 > 1 then it2 := 0; break fi: od: if it2=1 then printf(`%d,`,n) fi: od:
    with(numtheory): cnt:=0: L:=[]: for w to 1 do for n from 1 while cnt<100 do dn:=divisors(n); Q:=map(z-> n+z+1, dn); if andmap(z-> z mod 3 = 0, Q) then cnt:=cnt+1; L:=[op(L),[cnt,n]]; fi; od od; L; # Walter Kehowski, Aug 09 2006
  • Mathematica
    ok[1]=True;ok[n_]:=And@@(Mod[#,3]==1&)/@FactorInteger[n][[All,1]];Select[Range[500],ok] (* Vincenzo Librandi, Aug 21 2012 *)
    lst={}; maxLen=331; Do[If[Reduce[m^2+m*n+n^2==k^2&&m>=n>=0&&GCD[k, m, n]==1, {m, n}, Integers]===False, Null[], AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jul 04 2013 from A034017 *)
  • PARI
    is(n)=my(f=factor(n)[,1]);for(i=1,#f,if(f[i]%3!=1,return(0)));1 \\ Charles R Greathouse IV, Feb 06 2013
    
  • PARI
    list(lim)=my(v=List([1]), mn, mx, t); forprime(p=7, lim\=1, if(p%6==1, listput(v, p))); if(lim<49, return(Vec(v))); forprime(p=7, sqrtint(lim), if(p%6>1, next); mx=1; while(v[mx+1]*p<=lim, for(i=mn=mx+1, mx=#v, t=p*v[i]; if(t>lim, break); listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Jan 11 2018

Extensions

More terms from James Sellers, Oct 30 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007

A024362 Number of primitive Pythagorean triangles with hypotenuse n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives number of times C takes value n.
a(A137409(n)) = 0; a(A008846(n)) > 0; a(A120960(n)) = 1; a(A024409(n)) > 1; a(A159781(n)) = 4. - Reinhard Zumkeller, Dec 02 2012
If the formula given below is used one is sure to find all a(n) values for hypotenuses n <= N if the summation indices r and s are cut off at rmax(N) = floor((sqrt(N-4)+1)/2) and smax(N) = floor(sqrt(N-1)/2). a(n) is the number of primitive Pythagorean triples with hypotenuse n modulo catheti exchange. - Wolfdieter Lang, Jan 10 2016

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 116-117, 1966.

Crossrefs

Programs

  • Haskell
    a024362 n = sum [a010052 y | x <- takeWhile (< nn) $ tail a000290_list,
                                 let y = nn - x, y <= x, gcd x y == 1]
                where nn = n ^ 2
    -- Reinhard Zumkeller, Dec 02 2012
    
  • Maple
    f:= proc(n) local F;
       F:= numtheory:-factorset(n);
       if map(t -> t mod 4, F) <> {1} then return 0 fi;
       2^(nops(F)-1)
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Jan 11 2016
  • Mathematica
    Table[a0=IntegerExponent[n,2]; If[n==1 || a0>0, cnt=0, m=n/2^a0; p=Transpose[FactorInteger[m]][[1]]; c=Count[p, _?(Mod[#,4]==1 &)]; If[c==Length[p], cnt=2^(c-1), 0]]; cnt, {n,100}]
    a[n_] := If[n==1||EvenQ[n]||Length[Select[FactorInteger[n], Mod[#[[1]], 4]==3 &]] >0, 0, 2^(Length[FactorInteger[n]]-1)]; Array[a, 100] (* Frank M Jackson, Jan 28 2018 *)
  • PARI
    a(n)={my(m=0,k=n,n2=n*n,k2,l2);
    while(1,k=k-1;k2=k*k;l2=n2-k2;if(l2>k2,break);if(issquare(l2),if(gcd(n,k)==1,m++)));  return(m);} \\ Stanislav Sykora, Mar 23 2015

Formula

a(n) = [q^n] T(q), n >= 1, where T(q) = Sum_{r>=1,s>=1} rpr(2*r-1, 2*s)*q^c(r,s), with rpr(k,l) = 1 if gcd(k,l) = 1, otherwise 0, and c(r,s) = (2*r-1)^2 + (2s)^2. - Wolfdieter Lang, Jan 10 2016
If all prime factors of n are in A002144 then a(n) = 2^(A001221(n)-1), otherwise a(n) = 0. - Robert Israel, Jan 11 2016
a(4*n+1) = A106594(n), other terms are 0. - Andrey Zabolotskiy, Jan 21 2022

A024409 Hypotenuses of more than one primitive Pythagorean triangle.

Original entry on oeis.org

65, 85, 145, 185, 205, 221, 265, 305, 325, 365, 377, 425, 445, 481, 485, 493, 505, 533, 545, 565, 629, 685, 689, 697, 725, 745, 785, 793, 845, 865, 901, 905, 925, 949, 965, 985, 1025, 1037, 1073, 1105, 1145, 1157, 1165, 1189, 1205, 1241, 1261, 1285, 1313, 1325
Offset: 1

Views

Author

Keywords

Comments

The subsequence allowing 4 different shapes is in A159781. [R. J. Mathar, Apr 12 2010]
A024362(a(n)) > 1. - Reinhard Zumkeller, Dec 02 2012

Examples

			65^2 = 16^2 + 63^2 = 33^2 + 56^2 (also = 25^2 + 60^2 = 39^2 + 52^2, but these are not primitive, with gcd = 5 resp. 13). Note that 65 = 1^2 + 8^2 = 4^2 + 7^2 is also the least integer > 1 to be a sum a^2 + b^2 with gcd(a,b) = 1 in two ways. - _M. F. Hasler_, May 18 2023
		

Crossrefs

Cf. A020882, A120960, subsequence of A008846.

Programs

  • Haskell
    import Data.List (findIndices)
    a024409 n = a024409_list !! (n-1)
    a024409_list = map (+ 1) $ findIndices (> 1) a024362_list
    -- Reinhard Zumkeller, Dec 02 2012
  • Mathematica
    f[c_] := f[c] = Block[{a = 1, b, cnt = 0, lmt = Floor[ Sqrt[c^2/2]]}, While[b = Sqrt[c^2 - a^2]; a < lmt, If[IntegerQ@ b && GCD[a, b, c] == 1, cnt++]; a++]; cnt]Select[1 + 4 Range@ 335, f@# > 1 &] (* Robert G. Wilson v, Mar 16 2014 *)
    Select[Tally[Sqrt[Total[#^2]]&/@Union[Sort/@({Times@@#,(Last[#]^2-First[ #]^2)/2}&/@(Select[Subsets[Range[1,71,2],{2}],GCD@@# == 1&]))]],#[[2]]> 1&][[All,1]]//Sort (* Harvey P. Dale, Sep 29 2018 *)
Showing 1-10 of 54 results. Next