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.

A037213 Expansion of Sum_{n>=0} n*q^(n^2).

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Multiplicative with a(p^(2e)) = p^e, a(p^(2e+1)) = 0. - Mitch Harris, Jun 09 2005
a(n) is the square root of n if n is square, zero otherwise. - Carl R. White, May 23 2009
Möbius transform of A069290(n). - Wesley Ivan Hurt, Jul 09 2025

Crossrefs

Programs

  • Haskell
    a037213 n = if n == r ^ 2 then r else 0  where r = a000196 n
    a037213_list = zipWith (*) a010052_list a000196_list
    -- Reinhard Zumkeller, Nov 09 2012
    
  • Mathematica
    Table[If[IntegerQ[n^(1/2)], n^(1/2), 0], {n, 0, 100}] (* Geoffrey Critzer, Feb 21 2015 *)
  • PARI
    a(n) = if (issquare(n), sqrtint(n), 0); \\ Michel Marcus, Aug 21 2025

Formula

Dirichlet generating function: zeta(2*s-1). - Franklin T. Adams-Watters, Sep 11 2005
a(n) = sqrt(n) * floor( cos^2(Pi * sqrt(n)) ). - Carl R. White, May 23 2009
a(n) = A000196(n) * A010052(n). - Reinhard Zumkeller, Jan 27 2010
Sum_{k=1..n} a(k) ~ n/2. - Vaclav Kotesovec, Aug 19 2021
a(n) = A066839(n) - A070039(n). - Ridouane Oudra, Jun 24 2025
a(n) = Sum_{d|n} A069290(d) * mu(n/d). - Wesley Ivan Hurt, Jul 09 2025