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.

A175341 Number of coprime pairs (x,y) with x^2+y^2 <= n^2.

Original entry on oeis.org

0, 4, 8, 16, 32, 48, 72, 88, 120, 152, 192, 224, 264, 312, 384, 440, 480, 544, 616, 672, 768, 832, 928, 1000, 1112, 1192, 1280, 1384, 1488, 1584, 1704, 1816, 1960, 2072, 2224, 2344, 2480, 2600, 2752, 2912, 3064, 3184, 3360, 3480, 3696, 3856, 4016, 4176
Offset: 0

Views

Author

R. J. Mathar, Apr 16 2010

Keywords

Examples

			a(2) = 8 counts (x,y) = (-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0) and (1,1).
		

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    b[n_] := b[n] = If[n == 0, 0, b[n-1] + 4 a89[n]];
    a[n_] := b[n^2];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 02 2023 *)

Formula

a(n) = 4*A176562(n). - R. J. Mathar, May 07 2010
a(n) = A304651(n^2). - Seiichi Manyama, May 26 2018

A305117 a(n) = A304651(n)/4.

Original entry on oeis.org

0, 1, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 12, 14, 14, 14, 16, 16, 16, 16, 16, 18, 18, 18, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 26, 26, 26, 26, 26, 28, 28, 28, 30, 30, 30, 30, 34, 34, 34, 34, 34, 34
Offset: 0

Views

Author

Seiichi Manyama, May 26 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    a[n_] := a[n] = If[n == 0, 0, a[n-1] + a89[n]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 02 2023 *)

Formula

a(n) = a(n-1) + A000089(n) for n > 0.
Showing 1-2 of 2 results.