%I #14 Apr 06 2021 15:05:58
%S 1,0,-1,0,-1,0,-1,0,0,1,-1,0,-1,1,1,0,-1,0,-1,-1,1,1,-1,0,0,1,0,0,-1,
%T -2,-1,0,1,1,1,0,-1,1,1,0,-1,-2,-1,0,0,1,-1,0,0,0,1,0,-1,0,1,-1,1,1,
%U -1,1,-1,1,0,0,1,-1,-1,0,1,-1,-1,0,-1,1,0,0,1,-1,-1,0,0,1,-1,0,1,1,1,0,-1,1,1,0,1,1,1,0,-1,0,0,0,-1,-1,-1,0,-1,1,-1,0,-1
%N a(1)=1. For n >= 2, Sum_{k|n, neither (k+1) nor (k-1) divides n} a(k) = 0. (The sum is over the isolated divisors of n. A divisor, k, of n is isolated if neither (k-1) nor (k+1) divides n.).
%C The value of a(2) is arbitrary. If a(2) is any number and the rest of the sequence remains unchanged, then the sum over isolated divisors still always equals 0 for all n >= 2.
%H Antti Karttunen, <a href="/A131038/b131038.txt">Table of n, a(n) for n = 1..65537</a>
%e The positive divisors of 30 are 1,2,3,5,6,10,15,30. Of these, 1,2,3 are adjacent and 5 and 6 are adjacent. So the isolated divisors of 30 are 10,15,30. Therefore a(30) is such that a(10)+a(15)+a(30) = 1 +1 +a(30) =0. So a(30) = -2.
%o (PARI) A131038(n) = if(n<=2,2-n,-((n%2)+sumdiv(n,d,if((d<n)&&(d>2)&&(n%(d-1))&&(n%(d+1)),A131038(d),0)))); \\ _Antti Karttunen_, Apr 06 2021
%Y Cf. A008683, A132881.
%K sign
%O 1,30
%A _Leroy Quet_, Sep 23 2007
%E Extended by _Ray Chandler_, Jun 25 2008