login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of times that the sum of two coprime squares of opposite parity is an integer between n^2 and (n+1)^2; multiple representations are counted multiply.
2

%I #4 Mar 30 2012 17:22:26

%S 0,1,1,1,1,2,2,3,4,3,2,4,5,5,3,6,5,5,7,6,7,8,9,5,6,11,7,8,8,12,9,10,

%T 12,13,11,10,11,14,11,11,13,11,17,15,12,14,18,14,15,18,18,15,16,17,18,

%U 17,20,18,19,18,19,22,20,21,17,20,21,25,18,20,23,26,24,23,23,25,28,24,24

%N Number of times that the sum of two coprime squares of opposite parity is an integer between n^2 and (n+1)^2; multiple representations are counted multiply.

%C See A077768 for a similar, but less restrictive sequence. A077774 counts multiple representations only once. Note that by also requiring a unique representation, we obtain sequence A077766, which counts primes of the form 4k+1.

%e a(8)=3 because 65=64+1, 65=49+16 and 73=64+9 are between squares 49 and 64. Note that 65 occurs twice.

%t maxN=100; lst={}; For[n=1, n<=maxN, n++, cnt=0; i=n; j=0; While[i>=j, j=1; While[i^2+j^2<(n+1)^2, If[i>=j&&i^2+j^2>n^2&&GCD[i, j]==1&&OddQ[i]==EvenQ[j], cnt++ ]; j++ ]; i--; j-- ]; AppendTo[lst, cnt]]; lst

%Y Cf. A077766, A077768, A077774.

%K nonn

%O 1,6

%A _T. D. Noe_, Nov 20 2002