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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 6, 7, 7, 7, 8, 10, 10, 11, 11, 12, 13, 15, 15, 14, 18, 17, 17, 19, 19, 21, 20, 21, 23, 22, 26, 25, 26, 27, 25, 29, 27, 32, 30, 28, 33, 33, 36, 34, 33, 37, 36, 39, 38, 40, 39, 38, 42, 40, 46, 43, 45, 44, 46, 48, 47, 49, 50, 48, 50, 50, 53, 55, 52, 55, 53, 60, 57
Offset: 1

Views

Author

T. D. Noe, Nov 20 2002

Keywords

Comments

Related to the circle problem, cf. A077770. Note that 2*a(n)-A077770(n)/4 is the characteristic sequence for the Beatty sequence A001951. See A077769 for a more restrictive case. A077773 counts multiple representations only once.

Examples

			a(8)=7 because 65=64+1, 65=49+16, 68=64+4, 72=36+36, 73=64+9, 74=49+25 and 80=64+16 are between squares 64 and 81. 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, cnt++ ]; j++ ]; i--; j-- ]; AppendTo[lst, cnt]]; lst

A077774 Number of integers between n^2 and (n+1)^2 that are the sum of two coprime squares of opposite parity; multiple representations are counted once.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 2, 3, 4, 3, 3, 5, 4, 4, 5, 5, 5, 5, 6, 5, 5, 7, 6, 6, 6, 8, 7, 7, 8, 9, 8, 7, 8, 9, 7, 9, 10, 7, 11, 10, 9, 10, 13, 11, 8, 11, 12, 12, 11, 11, 13, 11, 13, 12, 12, 13, 13, 13, 14, 14, 13, 14, 13, 15, 13, 15, 14, 17, 15, 14, 17, 16, 16, 16, 17, 16, 18, 18, 16, 15
Offset: 1

Views

Author

T. D. Noe, Nov 20 2002

Keywords

Comments

See A077773 for a similar, but less restrictive sequence. A077769 counts multiple representations multiply.

Examples

			a(8)=2 because 65=64+1=49+16 and 73=64+9 are between squares 49 and 64. Note that 65 is counted only once.
		

Crossrefs

Programs

  • Mathematica
    maxN=100; lst={}; For[n=1, n<=maxN, n++, sqrs={}; 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], AppendTo[sqrs, i^2+j^2]]; j++ ]; i--; j-- ]; AppendTo[lst, Length[Union[sqrs]]]]; lst
Showing 1-2 of 2 results.