login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089216 Number of triples (x,y,z) of integers such that 0 <= x <= y < n, 0 <= z < n, n^2 = x^2 + y^2 - z^2. 0
0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 2, 1, 3, 3, 2, 2, 5, 3, 5, 4, 4, 4, 7, 4, 7, 7, 6, 6, 10, 6, 9, 9, 9, 11, 10, 7, 12, 11, 12, 10, 16, 10, 16, 13, 11, 15, 18, 13, 18, 17, 17, 16, 23, 16, 17, 16, 18, 20, 24, 17, 26, 25, 21, 22, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,11

COMMENTS

For any integer n>=7, there exist integers x, y, z such that 0 <= x < n, 0 <= y < n, 0 <= z < n, n^2 = x^2 + y^2 - z^2. Hence the only functions f of the positive integers into themselves such that f(m^2+n^2) = f(m)^2 + f(n)^2 are the identity and the null function.

LINKS

Table of n, a(n) for n=1..65.

MATHEMATICA

r[n_] := Reduce[n^2 == x^2 + y^2 - z^2 && 0 <= x <= y < n && 0 <= z < n, {x, y, z}, Integers]; Reap[For[n = 1, n <= 100, n++, rn = r[n]; w = Which[rn === False, 0, Head[rn] === And, 1, Head[rn] === Or, Length[rn], True, -1; Print[n, " error"]]; Print[w]; Sow[w]]][[2, 1]] (* Jean-François Alcover, Jan 21 2016 *)

PROG

(Turbo-Pascal) VAR nMax, n, nbt, x, y, z: integer; BEGIN write('Maximum value of n: '); readln(nMax); for n := 1 to nMax do begin write(n, ':'); nbt := 0; for y := 0 to n-1 do for x := 0 to y do for z := 0 to n-1 do begin if x*x+y*y-z*z=n*n then begin nbt := nbt+1; write('(', x, ', ', y, ', ', z, ')'); end; end; writeln(' ', nbt, '.'); end; END.

CROSSREFS

Sequence in context: A308584 A046819 A159945 * A234200 A102746 A287618

Adjacent sequences:  A089213 A089214 A089215 * A089217 A089218 A089219

KEYWORD

nonn

AUTHOR

Roger Cuculière, Dec 10 2003

EXTENSIONS

More terms from Jean-François Alcover, Jan 21 2016

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 03:22 EDT 2020. Contains 336421 sequences. (Running on oeis4.)