login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A279817
a(1) = -1; for n>1, Sum_{d|n} a(n-d+1) = 0.
0
-1, 1, 1, 0, 1, 0, 1, -1, 0, 1, 1, -2, 1, 1, -1, 1, 1, -3, 1, -3, 1, 2, 1, -6, 0, 0, 0, 0, 1, -2, 1, -2, -1, 5, -1, -4, 1, 3, 0, 3, 1, -3, 1, -7, -3, 10, 1, -9, 0, -10, 2, -4, 1, -7, 2, 6, -1, 4, 1, -25, 1, 2, -2, 4, -1, -11, 1, 6, -1, 13, 1, -20, 1, -3, -4, 0
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
Sequence in context: A322318 A014649 A326568 * A309386 A253642 A070084
KEYWORD
sign
AUTHOR
Gevorg Hmayakyan, Dec 19 2016
STATUS
approved