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.

A077769 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.

Original entry on oeis.org

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, 12, 13, 11, 10, 11, 14, 11, 11, 13, 11, 17, 15, 12, 14, 18, 14, 15, 18, 18, 15, 16, 17, 18, 17, 20, 18, 19, 18, 19, 22, 20, 21, 17, 20, 21, 25, 18, 20, 23, 26, 24, 23, 23, 25, 28, 24, 24
Offset: 1

Views

Author

T. D. Noe, Nov 20 2002

Keywords

Comments

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.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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