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-4 of 4 results.

A333462 a(n) is the number of Gaussian integers z such that (n-1)/2 < |z| <= n/2, divided by 4.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 5, 3, 4, 4, 6, 3, 7, 5, 7, 7, 10, 6, 8, 7, 11, 5, 12, 10, 12, 9, 13, 11, 10, 12, 16, 10, 18, 9, 19, 11, 18, 14, 14, 15, 21, 15, 20, 14, 22, 13, 23, 19, 23, 17, 24, 18, 22, 19, 27, 17, 26, 22, 28, 17, 31, 21, 26, 24, 28, 26, 30, 27, 29, 21
Offset: 1

Views

Author

Hugo Pfoertner, Mar 26 2020

Keywords

Crossrefs

Programs

  • PARI
    c=vectorsmall(2000000);for(x=1,1000,my(x2=x*x);c[x2]++;c[x2+x2]++;for(y=1,x-1,my(y2=y*y);c[x2+y2]+=2));
    a(n)=sum(k=ceil((1+(n-1)^2)/4),floor(n^2/4),c[k]);
    for(k=1,72,print1(a(k),", "))

A333572 a(n) is the number of Gaussian integers z with 0 < |z| <= n/2.

Original entry on oeis.org

0, 4, 8, 12, 20, 28, 36, 48, 68, 80, 96, 112, 136, 148, 176, 196, 224, 252, 292, 316, 348, 376, 420, 440, 488, 528, 576, 612, 664, 708, 748, 796, 860, 900, 972, 1008, 1084, 1128, 1200, 1256, 1312, 1372, 1456, 1516, 1596, 1652, 1740, 1792, 1884, 1960, 2052, 2120
Offset: 1

Views

Author

Hugo Pfoertner, Mar 27 2020

Keywords

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    for x from 1 to N/2 do
      for y from 0 to x do
        v:= ceil(2*sqrt(x^2+y^2));
        if v > N then break fi;
        if y=x or y=0 then V[v]:= V[v]+4 else V[v]:= V[v]+8 fi
    od od:
    ListTools:-PartialSums(convert(V,list)); # Robert Israel, Mar 29 2020

A333573 a(n) = A333572(n)/4.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 12, 17, 20, 24, 28, 34, 37, 44, 49, 56, 63, 73, 79, 87, 94, 105, 110, 122, 132, 144, 153, 166, 177, 187, 199, 215, 225, 243, 252, 271, 282, 300, 314, 328, 343, 364, 379, 399, 413, 435, 448, 471, 490, 513, 530, 554, 572, 594, 613, 640, 657
Offset: 1

Views

Author

Hugo Pfoertner, Mar 27 2020

Keywords

Crossrefs

A036705 Number of Gaussian integers z=a+bi satisfying n - 1/2 < |z| <= n + 1/2.

Original entry on oeis.org

1, 8, 12, 16, 32, 28, 40, 40, 48, 68, 56, 72, 68, 88, 88, 84, 112, 112, 112, 116, 112, 144, 140, 144, 144, 168, 164, 160, 184, 172, 200, 192, 188, 208, 224, 224, 228, 224, 248, 236, 264, 248, 264, 276, 264, 288, 276, 304, 304, 312
Offset: 0

Views

Author

Keywords

Comments

Number of integer Cartesian grid points covered by a ring around the origin with width 1 and outer radius n + 1/2. - Ralf Stephan, Nov 28 2013

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n==0, 1, inf = (n-1/2)^2; sup = (n+1/2)^2; 4 Sum[Boole[inf < x^2 + y^2 < sup], {x, 0, n}, {y, 1, n}]];
    a /@ Range[0, 49] (* Jean-François Alcover, Nov 14 2019 *)
  • PARI
    a(n)=sum(i=-n, n, sum(j=-n, n, d=sqrt(i*i+j*j); if(d>=n-1/2&&d<=n+1/2, 1))) \\ Ralf Stephan, Nov 28 2013

Extensions

Edited by Ralf Stephan, Nov 28 2013
Showing 1-4 of 4 results.