login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024359 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives number of times A takes value n. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,20

COMMENTS

Number of times n occurs in A020884.

a(A139544(n)) = 0; a(A024352(n)) > 0. - Reinhard Zumkeller, Nov 09 2012

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Ron Knott, Pythagorean Triples and Online Calculators

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}]

PROG

(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

(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(a<b && gcd(b, c)==1, s++)

    )

  );

  s

}

vector(100, n, nppt(n)) \\ Colin Barker, Oct 25 2015

CROSSREFS

Cf. A132404 (where records occur).

Sequence in context: A131038 A016353 A016398 * A088705 A065712 A153172

Adjacent sequences:  A024356 A024357 A024358 * A024360 A024361 A024362

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified September 26 01:25 EDT 2017. Contains 292500 sequences.