OFFSET
0,5
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
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
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
Sum_{k=1..n} a(k) ~ n/2. - Vaclav Kotesovec, Aug 19 2021
MATHEMATICA
Table[If[IntegerQ[n^(1/2)], n^(1/2), 0], {n, 0, 100}] (* Geoffrey Critzer, Feb 21 2015 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
STATUS
approved