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

A046079 Number of Pythagorean triangles with leg n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3, 1, 2, 1, 4, 4, 1, 1, 7, 2, 1, 3, 4, 1, 4, 1, 4, 4, 1, 4, 7, 1, 1, 4, 7, 1, 4, 1, 4, 7, 1, 1, 10, 2, 2, 4, 4, 1, 3, 4, 7, 4, 1, 1, 13, 1, 1, 7, 5, 4, 4, 1, 4, 4, 4, 1, 12, 1, 1, 7, 4, 4, 4, 1, 10, 4, 1, 1, 13, 4, 1, 4, 7, 1, 7, 4, 4, 4, 1, 4, 13, 1, 2, 7
Offset: 1

Views

Author

Keywords

Comments

Number of ways in which n can be the leg (other than the hypotenuse) of a primitive or nonprimitive right triangle.
Number of ways that 2/n can be written as a sum of exactly two distinct unit fractions. For every solution to 2/n = 1/x + 1/y, x < y, the Pythagorean triple is (n, y-x, x+y-n). - T. D. Noe, Sep 11 2002
For n>2, the positions of the ones in this sequence correspond to the prime numbers and their doubles, A001751. - Ant King, Jan 29 2011
Let L = length of longest leg, H = hypotenuse. For odd n: L =(n^2-1)/2 and H = L+1. For even n, L = (n^2-4)/4 and H = L+2. - Richard R. Forberg, May 31 2013
Or number of ways n^2 can be written as the difference of two positive squares: a(3) = 1: 3^2 = 5^2-4^2; a(8) = 2: 8^2 = 10^2-6^2 = 17^2-15^2; a(16) = 3: 16^2 = 20^2-12^2 = 34^2-30^2 = 65^2-63^2. - Alois P. Heinz, Aug 06 2019
Number of ways to write 2n as the sum of two positive integers r and s such that r < s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 21 2020

References

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

Crossrefs

Programs

  • Mathematica
    a[n_] := (DivisorSigma[0, If[OddQ[n], n, n / 2]^2] - 1) / 2; Table[a[i], {i, 100}] (* Amber Hu (hupo001(AT)gmail.com), Jan 23 2008 *)
    a[ n_] := Length @ FindInstance[ n > 0 && y > 0 && z > 0 && n^2 + y^2 == z^2, {y, z}, Integers, 10^9]; (* Michael Somos, Jul 25 2018 *)
  • PARI
    A046079(n) = ((numdiv(if(n%2, n, n/2)^2)-1)/2); \\ Antti Karttunen, Sep 27 2018
    
  • Python
    from math import prod
    from sympy import factorint
    def A046079(n): return prod((e+(p&1)<<1)-1 for p,e in factorint(n).items())>>1 # Chai Wah Wu, Sep 06 2022
  • Sage
    def A046079(n) : return (number_of_divisors(n^2 if n%2==1 else n^2/4) - 1) // 2 # Eric M. Schmidt, Jan 26 2013
    

Formula

For odd n, a(n) = A018892(n) - 1.
Let n = (2^a0)*(p1^a1)*...*(pk^ak). Then a(n) = [(2*a0 - 1)*(2*a1 + 1)*(2*a2 + 1)*(2*a3 + 1)*...*(2*ak + 1) - 1]/2. Note that if there is no a0 term, i.e., if n is odd, then the first term is simply omitted. - Temple Keller (temple.keller(AT)gmail.com), Jan 05 2008
For odd n, a(n) = (tau(n^2) - 1) / 2; for even n, a(n) = (tau((n / 2)^2) - 1) / 2. - Amber Hu (hupo001(AT)gmail.com), Jan 23 2008
a(n) = Sum_{i=1..n-1} (1 - ceiling(i*(2*n-i)/(2*n-2*i)) + floor(i*(2*n-i)/(2*n-2*i))). - Wesley Ivan Hurt, Apr 21 2020
Sum_{k=1..n} a(k) ~ (n / Pi^2) * (log(n)^2 + c_1 * log(n) + c_2), where c_1 = 2 * (gamma - 1) + 48*log(A) - 4*log(Pi) - 13*log(2)/3 = 3.512088... (gamma = A001620, log(A) = A225746), and c_2 = 6 * gamma^2 - (6 + log(2)) * gamma + 2 - Pi^2/2 + 19*log(2)^2/18 + log(2)/3 - 6*gamma_1 + 8 * (zeta'(2)/zeta(2))^2 + (4 - 12*gamma + 2*log(2)/3) * zeta'(2)/zeta(2) - 4*zeta''(2)/zeta(2) = -4.457877... (gamma_1 = -A082633). - Amiram Eldar, Nov 08 2024

A046081 Number of integer-sided right triangles with n as a hypotenuse or leg.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4, 2, 1, 5, 3, 2, 2, 1, 5, 4, 1, 1, 7, 4, 2, 3, 4, 2, 5, 1, 4, 4, 2, 5, 7, 2, 1, 5, 8, 2, 4, 1, 4, 8, 1, 1, 10, 2, 4, 5, 5, 2, 3, 5, 7, 4, 2, 1, 14, 2, 1, 7, 5, 8, 4, 1, 5, 4, 5, 1, 12, 2, 2, 9, 4, 4, 5, 1, 11, 4, 2, 1, 13, 8, 1, 5, 7, 2, 8, 5, 4, 4, 1, 5, 13, 2, 2, 7
Offset: 1

Views

Author

Keywords

Comments

Pythagorean triples including primitive ones and non-primitive ones. For a certain n, it may be a leg or the hypotenuse in either a primitive Pythagorean triple, or a non-primitive Pythagorean triple, or both. - Rui Lin, Nov 02 2019

Examples

			From _Rui Lin_, Nov 02 2019: (Start)
n=25 is the least number which meets all of following cases:
1. 25 is a leg of a primitive Pythagorean triple (25,312,313), so A024361(25)=1;
2. 25 is the hypotenuse of a primitive Pythagorean triple (7,24,25), so A024362(25)=1;
3. 25 is a leg of a non-primitive Pythagorean triple (25,60,65), so A328708(25)=1;
4. 25 is the hypotenuse of a non-primitive Pythagorean triple (15,20,25), so A328712(25)=1;
5. Combination 1. and 3. means A046079(25)=2;
6. Combination 2. and 4. means A046080(25)=2;
7. Combination 1. and 2. means A024363(25)=2;
8. Combination 3. and 4. means A328949(25)=2;
9. Combination of 1., 2., 3., and 4. means A046081(25)=4. (End)
		

References

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

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1&][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2]-1)/2 + (Times @@ (2*f+1) - 1)/2]; Array[a, 99] (* Jean-François Alcover, Jul 19 2017 *)
  • PARI
    a(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k,1] % 4) != 1, f[k,2] = 0);); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1);} \\ Michel Marcus, Mar 07 2016
    
  • Python
    from sympy import factorint
    def a(n):
        p1, p2 = 1, 1
        for i in factorint(n).items():
            if i[0] % 4 == 1:
                p2 *= i[1] * 2 + 1
            p1 *= i[1] * 2 + 1 - (2 if i[0] == 2 else 0)
        return (p1 + p2)//2 - 1
    print([a(n) for n in range(1, 100)])  # Oleg Sorokin, Mar 02 2023

Formula

a(n) = A046079(n) + A046080(n). - Lekraj Beedassy, Dec 01 2003
From Rui Lin, Nov 02 2019: (Start)
a(n) = A024363(n) + A328949(n).
a(n) = A024361(n) + A024362(n) + A328708(n) + A328712(n). (End)

Extensions

Improved name by Bernard Schott, Jan 03 2019

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

A068068 Number of odd unitary divisors of n. d is a unitary divisor of n if d divides n and gcd(d,n/d)=1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 4, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 1, 4, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 2, 4, 1, 4, 4, 2, 2, 4, 4, 2, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 2, 4, 4, 2, 4, 2, 2, 4, 4, 2, 4, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 8
Offset: 1

Views

Author

Robert G. Wilson v, Feb 19 2002

Keywords

Comments

Shadow transform of triangular numbers.
a(n) is the number of primitive Pythagorean triangles with inradius n. For the smallest inradius of exactly 2^n primitive Pythagorean triangles see A070826.
Number of primitive Pythagorean triangles with leg 4n. For smallest (even) leg of exactly 2^n PPTs, see A088860. - Lekraj Beedassy, Jul 12 2006
As shown by Chi and Killgrove, a(n) is the total number of primitive Pythagorean triples satisfying area = n * perimeter, or equivalently 2 raised to the power of the number of distinct, odd primes contained in n. - Ant King, Mar 15 2011
This is the case k=0 of the sum over the k-th powers of the odd unitary divisors of n, which is multiplicative with a(2^e)=1 and a(p^e)=1+p^(e*k), p>2, and has Dirichlet g.f. zeta(s)*zeta(s-k)*(1-2^(k-s))/( zeta(2s-k)*(1-2^(k-2*s)) ). - R. J. Mathar, Jun 20 2011
Also the number of odd squarefree divisors of n: a(n) = Sum_{k = 1..A034444(k)} (A077610(n,k) mod 2) = Sum_{k = 1..A034444(k)} (A206778(n,k) mod 2). - Reinhard Zumkeller, Feb 12 2012
a(n) is also the number of even unitary divisors of 2*n. - Amiram Eldar, Jan 28 2023

Crossrefs

Programs

  • Haskell
    a068068 = length . filter odd . a077610_row
    -- Reinhard Zumkeller, Feb 12 2012
    
  • Maple
    A068068 := proc(n) local a,f; a :=1 ; for f in ifactors(n)[2] do if op(1,f) > 2 then a := a*2 ; end if; end do: a ; end proc: # R. J. Mathar, Apr 16 2011
  • Mathematica
    a[n_] := Length[Select[Divisors[n], OddQ[ # ]&&GCD[ #, n/# ]==1&]]
    a[n_] := 2^(PrimeNu[n]+Mod[n, 2]-1); Array[a, 105] (* Jean-François Alcover, Dec 01 2015 *)
    f[p_, e_] := If[p == 2, 1, 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    a(n) = sumdiv(n, d, (d%2)*(gcd(d, n/d)==1)); \\ Michel Marcus, May 13 2014
    
  • PARI
    a(n) = 2^omega(n>>valuation(n,2)) \\ Charles R Greathouse IV, May 14 2014

Formula

a(n) = A034444(2n)/2. If n is even, a(n) = 2^(omega(n)-1); if n is odd, a(n) = 2^omega(n). Here omega(n) = A001221(n) is the number of distinct prime divisors of n.
Multiplicative with a(2^e) = 1, a(p^e) = 2, p>2. - Christian G. Bower May 18 2005
a(n) = A024361(4n). - Lekraj Beedassy, Jul 12 2006
Dirichlet g.f.: zeta^2(s)/ ( zeta(2*s)*(1+2^(-s)) ). Dirichlet convolution of A034444 and A154269. - R. J. Mathar, Apr 16 2011
a(n) = Sum_{d|n} mu(2*d)^2. - Ridouane Oudra, Aug 11 2019
Sum_{k=1..n} a(k) ~ 4*n*((log(n) + 2*gamma - 1 + log(2)/3) / Pi^2 - 12*zeta'(2) / Pi^4), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Sep 18 2020
a(n) = Sum_{d divides n, d odd} mu(d)^2. - Peter Bala, Feb 01 2024

Extensions

Edited by Dean Hickerson, Jun 08 2002

A024359 Number of primitive Pythagorean triangles with short leg n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 2, 2, 1, 0, 1, 1, 2, 0, 1, 3, 1, 0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 1, 1, 0, 2, 2, 1, 0, 1, 1, 1, 0, 1, 3, 2, 0, 2
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 A takes value n.
Number of times n occurs in A020884.
a(A139544(n)) = 0; a(A024352(n)) > 0. - Reinhard Zumkeller, Nov 09 2012

Crossrefs

Cf. A020884, A024352, A024360, A024361, A132404 (where records occur), A139544.

Programs

  • Haskell
    a024359_list = f 0 1 a020884_list where
       f c u vs'@(v:vs) | u == v = f (c + 1) u vs
                        | u /= v = c : f 0 (u + 1) vs'
    -- Reinhard Zumkeller, Nov 09 2012
    
  • Mathematica
    solns[a_] := Module[{b, c, soln}, soln = Reduce[a^2 + b^2 == c^2 && a < b && c > 0 && GCD[a, b, c] == 1, {b, c}, Integers]; If[soln === False, 0, If[soln[[1, 1]] === b, 1, Length[soln]]]]; Table[solns[n], {n, 100}]
    (* Second program: *)
    a[n_] := Module[{s = 0, b, c, d, g}, Do[g = Quotient[n^2, d]; If[d <= g && Mod[d+g, 2] == 0, c = Quotient[d+g, 2]; b = g-c; If[n < b && GCD[b, c] == 1, s++]], {d, Divisors[n^2]}]; s]; Array[a, 100] (* Jean-François Alcover, Apr 27 2019, from PARI *)
  • PARI
    nppt(a) = {
      my(s=0, b, c, d, g);
      fordiv(a^2, d,
        g=a^2\d;
        if(d<=g && (d+g)%2==0,
          c=(d+g)\2; b=g-c;
          if(aColin Barker, Oct 25 2015

Formula

a(n) = A024361(n) - A024360(n). - Ray Chandler, Feb 03 2020

A024363 Number of primitive Pythagorean triangles with side n.

Original entry on oeis.org

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

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives number of times AUBUC takes value n.
Using Euclidean parameters (x, y) with x > y to generate primitive Pythagorean triples to capture all occurrences of side n, the Mma program below must allow the x parameter to iterate at least (n+1)/2 times. - Frank M Jackson, Jun 12 2017

Crossrefs

Programs

  • Mathematica
    lst={}; xmax=51; Do[If[GCD[x, y]==1&&OddQ[x+y], AppendTo[lst, Sort@{x^2-y^2, 2 x*y, x^2+y^2}]], {x, xmax}, {y, x}]; BinCounts[Select[Flatten@lst, #<2xmax &], {1, 2(xmax-1), 1}] (* or *)
    a[n_] := Block[{x, y, s = List@ ToRules@ Reduce[(x^2-y^2 == n^2 || x^2 + y^2 == n^2) && x>y>0, {x, y}, Integers]}, If[s == {}, 0, Length@ Select[ {x, y} /. s, GCD @@ # == 1 &]]]; Array[a, 99] (* Giovanni Resta, Jun 19 2017 *)

Formula

a(n)=0 for n=1 and n=2 (mod 4)=A016825. a(n)=A024361(n)+A024362(n). - Lekraj Beedassy, Dec 01 2003

A379830 a(n) is the number of Pythagorean triples (u, v, w) for which w - u = n where u < v < w.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 0, 2, 0, 4, 0, 1, 0, 1, 0, 2, 3, 1, 2, 1, 0, 1, 0, 5, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 1, 2, 1, 0, 2, 4, 7, 0, 1, 0, 4, 0, 2, 0, 1, 0, 1, 0, 1, 2, 5, 0, 1, 0, 1, 0, 1, 0, 8, 0, 1, 3, 1, 0, 1, 0, 2, 6, 1, 0, 1, 0, 1, 0
Offset: 0

Author

Felix Huber, Jan 07 2025

Keywords

Comments

The difference between the hypotenuse and the short leg of a primitive Pythagorean triple (p^2 - q^2, 2*p*q, p^2 + q^2) (where p > q are coprimes and not both odd) is d = max(2*q^2, (p - q)^2). For every of these primitive Pythagorean triples whose d divides n, there is a Pythagorean triple with w - u = n. Therefore d <= n and it follows that 1 <= q <= sqrt(n/2) and q + 1 <= p <= q + sqrt(n), which means that there is a finite number of Pythagorean triples with w - u = n.

Examples

			The a(18) = 4 Pythagorean triples are (27, 36, 45), (16, 30, 34), (40, 42, 58), (7, 24, 25) because 45 - 27 = 34 - 16 = 58 - 40 = 25 - 7 = 18.
See also linked Maple program "Pythagorean triples for which w - u = n".
		

Programs

  • Maple
    A379830:=proc(n)
        local a,p,q;
        a:=0;
        for q to isqrt(floor(n/2)) do
            for p from q+1 to q+isqrt(n) do
                if igcd(p,q)=1 and (is(p,even) or is(q,even)) and n mod max((p-q)^2,2*q^2)=0 then
                    a:=a+1
                fi
            od
        od;
        return a
    end proc;
    seq(A379830(n),n=0..87);

A024360 Number of primitive Pythagorean triangles with long leg n.

Original entry on oeis.org

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

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives number of times B takes value n.
Number of times n occurs in A020883.

Crossrefs

Programs

  • Mathematica
    A[s_] := With[{s6 = StringPadLeft[ToString[s], 6, "0"]}, Cases[Import[ "https://oeis.org/A" <> s6 <> "/b" <> s6 <> ".txt", "Table"], {, }][[;; 10000, 2]]];
    A@024361 - A@024359 (* Jean-François Alcover, Mar 27 2020 *)

Formula

a(n) = A024361(n) - A024359(n). - Ray Chandler, Feb 03 2020

A024355 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives values of AUB, sorted.

Original entry on oeis.org

3, 4, 5, 7, 8, 9, 11, 12, 12, 13, 15, 15, 16, 17, 19, 20, 20, 21, 21, 23, 24, 24, 25, 27, 28, 28, 29, 31, 32, 33, 33, 35, 35, 36, 36, 37, 39, 39, 40, 40, 41, 43, 44, 44, 45, 45, 47, 48, 48, 49, 51, 51, 52, 52, 53, 55, 55, 56, 56, 57, 57, 59, 60, 60, 60, 60, 61, 63, 63, 64, 65
Offset: 1

Keywords

Comments

Union of A020883 and A020884, sorted (with multiplicity); n occurs A024361(n) times. - Ray Chandler, Feb 03 2020

Crossrefs

A328708 Number of non-primitive Pythagorean triples with leg n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 2, 2, 0, 2, 0, 2, 2, 1, 0, 5, 1, 1, 2, 2, 0, 4, 0, 3, 2, 1, 2, 5, 0, 1, 2, 5, 0, 4, 0, 2, 5, 1, 0, 8, 1, 2, 2, 2, 0, 3, 2, 5, 2, 1, 0, 9, 0, 1, 5, 4, 2, 4, 0, 2, 2, 4, 0, 10, 0, 1, 5, 2, 2, 4, 0, 8, 3, 1, 0, 9, 2, 1, 2, 5, 0, 7, 2, 2, 2, 1, 2, 11, 0, 2, 5, 5, 0, 4
Offset: 1

Author

Rui Lin, Oct 26 2019

Keywords

Comments

Pythagorean triple including primitive ones and non-primitive ones. For a certain n, it may be a leg in either primitive Pythagorean triple, or non-primitive Pythagorean triple, or both.
This sequence is the count of n as leg in non-primitive Pythagorean triple.

Examples

			n=3 as leg in only one primitive Pythagorean triple, (3,4,5); so a(3)=0.
n=6 as leg in only one non-primitive Pythagorean triple, (6,8,10); so a(6)=1.
n=8 as leg in one primitive Pythagorean triple (8,15,17) and in one non-primitive Pythagorean triple (6,8,10); so a(8)=1.
		

References

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

Crossrefs

Formula

a(n) = A046079(n) - A024361(n).
Showing 1-10 of 12 results. Next