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.

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

Original entry on oeis.org

1, 3, 4, 4, 6, 8, 8, 8, 9, 11, 13, 13, 13, 15, 15, 15, 17, 19, 20, 20, 22, 22, 22, 22, 22, 26, 28, 28, 28, 30, 30, 30, 31, 31, 33, 33, 35, 37, 37, 37, 39, 41, 41, 41, 41, 43, 43, 43, 43, 45, 48, 48, 50, 52, 52, 52, 52, 52, 54, 54, 54, 56, 56, 56, 58, 62, 62, 62, 64
Offset: 0

Views

Author

Alex Ratushnyak, Apr 01 2013

Keywords

Crossrefs

Cf. A000925 (first differences).
Cf. A000606 (number of nonnegative solutions to x^2 + y^2 + z^2 <= n).
Cf. A057655 (number of integer solutions to x^2 + y^2 <= n).

Programs

  • Mathematica
    nn = 68; t = Table[0, {nn}]; Do[d = x^2 + y^2; If[0 < d <= nn, t[[d]]++], {x, 0, nn}, {y, 0, nn}]; Accumulate[Join[{1}, t]] (* T. D. Noe, Apr 01 2013 *)
  • Python
    for n in range(99):
      k = 0
      for x in range(99):
        s = x*x
        if s>n: break
        for y in range(99):
            sy = s + y*y
            if sy>n: break
            k+=1
      print(str(k), end=', ')

Formula

G.f.: (1/(1 - x))*(Sum_{k>=0} x^(k^2))^2. - Ilya Gutkovskiy, Mar 14 2017