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.

Previous Showing 11-13 of 13 results.

A255250 Array T(n, m) of numbers of points of a square lattice in the first octant covered by a circular disk of radius n (centered at any lattice point taken as origin) with ordinate y = m.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Mar 14 2015

Keywords

Comments

The row length of this array (irregular triangle) is 1 + flpoor(n/sqrt(2)) = 1 + A049472(n) = 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, ...
This entry is motivated by the proposal A255195 by Mats Granvik, who gave the first differences of this array.
See the MathWorld link on Gauss's circle problem.
The first octant of a square lattice (x, y) with n = x >= y = m >= 0 is considered. The number of lattice points in this octant covered by a circular disk of radius R = n around the origin having ordinate value y = m are denoted by T(n, m), for n >= 0 and m = 0, 1, ..., floor(n/sqrt(2)).
The row sums give RS(n) = A036702(n), n >= 0. This is the total number of square lattice points in the first octant covered by a circular disk of radius R = n.
The alternating row sums give A256094(n), n >= 0.
The total number of square lattice points in the first quadrant covered by a circular disk of radius R = n is therefore 2*RS(n) - (1 + floor(n/sqrt(2))) = A000603(n).

Examples

			The array (irregular triangle) T(n, m) begins:
n\m  0  1  2  3  4  5 6 7 8 9 10 ....
0:   1
1:   2
2:   3  1
3:   4  2  1
4:   5  3  2
5:   6  4  3  2
6:   7  5  4  3  1
7:   8  6  5  4  2
8:   9  7  6  5  3  2
9:  10  8  7  6  5  3 1
10: 11  9  8  7  6  4 3 1
11: 12 10  9  8  7  5 4 2
12: 13 11 10  9  8  6 5 3 1
13: 14 12 11 10  9  8 6 4 3 1
14: 15 13 12 11 10  9 7 6 4 2
15: 16 14 13 12 11 10 8 7 5 4  2
...
		

Crossrefs

Formula

T(n, m) = floor(sqrt(n^2 - m^2)) - (m-1), n >= 0, m = 0, 1, ..., floor(n/sqrt(2)).

A036698 a(n) is the number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0.

Original entry on oeis.org

0, 1, 3, 7, 12, 20, 28, 37, 49, 63, 79, 94, 110, 132, 153, 177, 199, 225, 252, 282, 314, 343, 379, 413, 448, 490, 530, 572, 613, 657, 705, 750, 802, 852, 906, 963, 1013, 1073, 1128, 1194, 1256, 1315, 1381, 1447, 1519, 1590, 1656
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • C
    typedef unsigned long ulong;
    ulong A036698(ulong i)
    {
        const ulong ring = i*i;
        ulong result = 0;
        for(ulong a = 1; a <= i; a++)
        {
            const ulong a2 = a*a;
            for(ulong b = 0; b <= i; b++)
            {
                ulong z = a2 + b*b;
                if ( ring >= z ) result++;
            }
        }
        return result;
    } /* Oskar Wieland, Apr 02 2013 */
    
  • PARI
    a(n)=my(n2=n^2);sum(a=1,n,sqrtint(n2-a^2)+1) \\ Charles R Greathouse IV, Apr 03 2013
    
  • PARI
    a(n) = sum(k=1, n^2, sumdiv(k, d, kronecker(-4, k/d))); \\ Seiichi Manyama, Dec 20 2021

Formula

a(n) = A000603(n) - n - 1.
a(n) = n^2 * Pi/4 + O(n). - Charles R Greathouse IV, Apr 03 2013
a(n) = A014200(n^2). - Seiichi Manyama, Dec 20 2021

A218706 Number of nonnegative integer solutions to x^2 + 2y^2 <= n^2.

Original entry on oeis.org

1, 2, 5, 9, 12, 19, 27, 33, 42, 54, 66, 77, 91, 105, 120, 138, 156, 175, 197, 218, 240, 263, 287, 314, 339, 367, 398, 430, 459, 493, 526, 556, 595, 637, 670, 709, 752, 794, 833, 878, 921, 965, 1018, 1065, 1112, 1163, 1215, 1266, 1317, 1370, 1433, 1492, 1544
Offset: 0

Views

Author

Jon Perry, Nov 04 2012

Keywords

Examples

			There are 5 solutions for n=2, namely (0,0), (0,1), (1,1), (1,0) and (2,0), so a(2) = 5.
		

Crossrefs

Programs

  • JavaScript
    for (i=0;i<50;i++) {
    c=0;
    for (a=0;a<=i;a++)
    for (b=0;b<=i;b++)
    if (Math.pow(a,2)+2*Math.pow(b,2)<=Math.pow(i,2)) c++;
    document.write(c+", ");
    }
  • Mathematica
    nn = 50; t = Sort[Select[Flatten[Table[x^2 + 2*y^2, {x, 0, nn}, {y, 0, nn}]], # <= nn^2 &]]; Table[Count[t, ?(# <= n^2 &)], {n, 0, nn}] (* _T. D. Noe, Nov 06 2012 *)
Previous Showing 11-13 of 13 results.