OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000 (first 10000 terms from Reinhard Zumkeller)
FORMULA
Dirichlet g.f.: zeta(2s)/zeta(4s) = prod[prime p: 1+p^(-2s) ], see A008966.
a(n) = A063524(sum(A225817(n,k)*A225817(n,A000005(n)+1-k): k=1..A000005(n))). - Reinhard Zumkeller, Aug 01 2013
Multiplicative with a(p^e) = 1 if e=2, a(p^e) = 0 if e=1 or e>2. - Antti Karttunen, Jul 28 2017
Sum_{k=1..n} a(k) ~ 6*sqrt(n) / Pi^2. - Vaclav Kotesovec, Feb 02 2019
From Antti Karttunen, Jul 18 2022: (Start)
(End)
EXAMPLE
a(3) = 0 because 3 is not the square of a squarefree number.
a(4) = 1 because sqrt(4) = 2, a squarefree number.
MAPLE
A227291 := proc(n)
local pe;
if n = 0 then
1;
else
for pe in ifactors(n)[2] do
if op(2, pe) <> 2 then
return 0 ;
end if;
end do:
end if;
1 ;
end proc:
seq(A227291(n), n=1..100) ; # R. J. Mathar, Feb 07 2023
MATHEMATICA
Table[Abs[Sum[MoebiusMu[n/d], {d, Select[Divisors[n], SquareFreeQ[#] &]}]], {n, 1, 200}] (* Geoffrey Critzer, Mar 18 2015 *)
PROG
(PARI) a(n)=if(n<1, 0, direuler(p=2, n, 1+X^2)[n])
(PARI) A227291(n) = factorback(apply(e->(2==e), factor(n)[, 2])); \\ Antti Karttunen, Jul 14 2022
(PARI) A227291(n) = (issquare(n) && issquarefree(sqrtint(n))); \\ Antti Karttunen, Jul 14 2022
(Haskell)
a227291 n = fromEnum $ (sum $ zipWith (*) mds (reverse mds)) == 1
where mds = a225817_row n
-- Reinhard Zumkeller, Jul 30 2013, Jul 07 2013
(Scheme) (define (A227291 n) (if (= 1 n) n (* (if (= 2 (A067029 n)) 1 0) (A227291 (A028234 n))))) ;; Antti Karttunen, Jul 28 2017
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Ralf Stephan, Jul 05 2013
STATUS
approved