

A138494


a and b are integers > 0 satisfying a^2 + b^2 = c^2. Sequence gives the number of choices for a and b between successive values of c. (Integer solutions for c (Pythagorean triples) are not included.)


1



1, 3, 4, 5, 7, 8, 11, 13, 13, 14, 15, 19, 20, 21, 21, 23, 26, 29, 29, 28, 35, 33, 34, 37, 37, 41, 40, 41, 45, 44, 51, 49, 51, 54, 49, 57, 54, 63, 59, 56, 65, 65, 71, 68, 65, 73, 72, 77, 75, 79, 78, 75, 83, 80, 91, 85, 89, 88, 91, 95, 94, 97, 99, 96, 99, 99, 105, 110, 103, 109
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Also number of pairs (a, b) such that floor(s) = n and s > n where a and b are positive integers and s = sqrt(a^2 + b^2).  David A. Corneth, May 30 2019


LINKS



FORMULA



PROG

(QBasic) OPEN "PYTH.TXT" FOR OUTPUT AS #1
FOR C = 1 TO 100
N = 0
FOR A = 1 TO C
FOR B = 1 TO C
D = SQR(A * A + B * B)
IF D > C AND D < C + 1 THEN N = N + 1
NEXT B
NEXT A
PRINT #1, N;
NEXT C
CLOSE
(PARI) a(n)={ cnt = 0; for( x = 1, n, for( y = floor( sqrt( n^2  x^2) ), floor( sqrt( n^2 + 2*n + 1  x^2) ), d = x^2 + y^2; if( sqrt(d) > n && sqrt(d) < n+1, cnt = cnt + 1); ) ); return(cnt); } /* Dimitri Papadopoulos, May 29 2019 */


CROSSREFS



KEYWORD

easy,nonn


AUTHOR

Rick Walcott (rick(AT)campbellsci.com), May 09 2008


STATUS

approved



