OFFSET
1,12
FORMULA
For primes p and q:
a(p) = 1.
If p^2 - p + 1 is prime then a(p^2) = 0.
If p*q - p + 1 and p*q - q + 1 are primes then a(p*q) = -1.
EXAMPLE
When n is any prime p, we have Sum_{d|p} a(p-d+1) = 0, so a(p-1+1) + a(p-p+1) = 0, hence a(p)=1.
For n=4, we have a(4-1+1) + a(4-2+1) + a(4-4+1) = 0, so a(4) + a(3) + a(1) = 0, hence a(4)=0.
MAPLE
a := proc (n) option remember; -add(a(n-d+1), d = `minus`(numtheory:-divisors(n), {1})) end proc; a(1) := -1; seq(simplify(a(i)), i = 1 .. 1000)
CROSSREFS
KEYWORD
sign
AUTHOR
Gevorg Hmayakyan, Dec 19 2016
STATUS
approved