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.

A236922 Number of integer solutions to a^2 + b^2 + 4*c^2 + 4*d^2 = n.

Original entry on oeis.org

1, 4, 4, 0, 8, 24, 16, 0, 24, 52, 24, 0, 32, 56, 32, 0, 24, 72, 52, 0, 48, 128, 48, 0, 96, 124, 56, 0, 64, 120, 96, 0, 24, 192, 72, 0, 104, 152, 80, 0, 144, 168, 128, 0, 96, 312, 96, 0, 96, 228, 124, 0, 112, 216, 160, 0, 192, 320, 120, 0, 192, 248, 128, 0, 24, 336, 192, 0, 144, 384, 192, 0, 312, 296, 152, 0, 160, 384, 224, 0, 144, 484, 168, 0, 256, 432, 176, 0
Offset: 0

Views

Author

N. J. A. Sloane, Feb 14 2014

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory);
    s:=n-> if whattype(n) = integer then sigma(n) else 0; fi;
    f:=proc(n) global s;
      if (n mod 4) = 0 then 8*s(n/4)-32*s(n/16)
    elif (n mod 4) = 2 then 4*s(n/2)
    elif (n mod 4) = 3 then 0
    else 4*s(n); fi; end;
    [seq(f(n),n=1..100)];
    # a(0)=1 must be added separately
  • Mathematica
    s[n_] := If[IntegerQ[n], DivisorSigma[1, n], 0]; a[n_] := Which[Mod[n, 4] == 0 , 8*s[n/4]-32*s[n/16], Mod[n, 4] == 2, 4*s[n/2], Mod[n, 4] == 3, 0, True, 4*s[n]]; a[0] = 1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 06 2014, after Maple *)

Formula

See Maple code.
G.f.: theta_3(q)^2*theta_3(q^4)^2, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 03 2018