login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A304651 Number of coprime pairs (x,y) with x^2 + y^2 <= n. 3
0, 4, 8, 8, 8, 16, 16, 16, 16, 16, 24, 24, 24, 32, 32, 32, 32, 40, 40, 40, 40, 40, 40, 40, 40, 48, 56, 56, 56, 64, 64, 64, 64, 64, 72, 72, 72, 80, 80, 80, 80, 88, 88, 88, 88, 88, 88, 88, 88, 88, 96, 96, 96, 104, 104, 104, 104, 104, 112, 112, 112, 120, 120, 120, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = a(n-1) + 4*A000089(n) for n > 0.
EXAMPLE
a(2) = 8 counts (x,y) = (-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0) and (1,1).
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] + 4 a89[n]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 02 2023 *)
CROSSREFS
Sequence in context: A040012 A054006 A029679 * A187768 A344984 A335212
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 26 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)