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.

A229296 Number of solutions to x^2 + y^2 == n (mod 2*n) for x,y in [0, 2*n).

Original entry on oeis.org

2, 4, 2, 8, 18, 4, 2, 16, 18, 36, 2, 8, 50, 4, 18, 32, 66, 36, 2, 72, 2, 4, 2, 16, 130, 100, 18, 8, 114, 36, 2, 64, 2, 132, 18, 72, 146, 4, 50, 144, 162, 4, 2, 8, 162, 4, 2, 32, 98, 260, 66, 200, 210, 36, 18, 16, 2, 228, 2, 72, 242, 4, 18, 128, 450, 4, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    A[n_] := Sum[If[Mod[a^2+b^2, 2n] == n, 1, 0], {a, 0, 2n - 1}, {b, 0, 2n - 1}]; Array[A, 100]
  • PARI
    a(n)={my(m=2*n); my(p=Mod(sum(i=0, m-1, x^(i^2%m)), x^m-1)^2); polcoeff( lift(p), n)} \\ Andrew Howroyd, Aug 07 2018

Formula

a(n) = 2*A086933(n). - Andrew Howroyd, Aug 07 2018