OFFSET
1,8
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(1) = 1.
If p>2, a(p) = 0, a(p^2) = -1, a(p^n) = 0 for n>2.
a(p1*p2*..*pn) = 0, a(2*p1*...*pn) = 0, a(4*p1*...*pn) = 0.
If p1,...,pn are odd it appears that:
a(p1^2*p2^2*...*pn^2) = (-1)^n,
a(p1^k1*p2^k2*...*pn^kn) = 0, if one of k1,...,kn > 2,
a(2*p1^k1*p2^k2*...*pn^kn) > 0 if one of k1,...,kn > 1.
a(2^n) = A264610(n).
EXAMPLE
For a prime p, a(p)^1 + a(1)^p = mu(p)^2=1 => a(p) = 0.
For n=6, a(1)^6 + a(2)^3 + a(3)^2 + a(6)^1 = mu(6) = 1, so 1 - 0 + 0 + a(6) = 1, so 1 + a(6) = 1, so a(6) = 0.
MAPLE
a := proc (n) option remember; numtheory:-mobius(n)^2-add(procname(n/d)^d, d = `minus`(numtheory:-divisors(n), {1})) end proc; a(1) := 1; La := seq(a(i), i = 1 .. 100)
MATHEMATICA
a[n_]:=If[n<2, 1, MoebiusMu[n]^2 - Sum[If[d==1, 0, a[n/d]^d], {d, Divisors[n]}]]; Table[a[n], {n, 100}] (* Indranil Ghosh, Mar 26 2017 *)
PROG
(PARI) a(n) = if (n==1, 1, moebius(n)^2- sumdiv(n, d, if (d==1, 0, a(n/d)^d)));
(Haskell)
a263774 1 = 1
a263774 n = foldl (-) (a008966 n) $ zipWith (^) (map a' $ reverse ds) ds
where a' x = if x == n then 0 else a263774 x
ds = a027750_row n
-- Reinhard Zumkeller, Dec 06 2015
CROSSREFS
KEYWORD
sign
AUTHOR
Gevorg Hmayakyan, Nov 28 2015
STATUS
approved