%I #9 Feb 16 2025 08:32:51
%S 1,1,-1,-1,1,0,0,-1,-1,1,1,-1,1,-1,0,-1,1,1,1,1,1,-1,0,0,-1,1,-1,-1,
%T -1,0,1,-1,1,0,0,1,0,-1,-1,-1,-1,1,1,0,0,-1,1,-1,-1,0,1,0,0,-1,-1,0,0,
%U 1,-1,1,0,0,1,1,-1,-1,0,-1,0,-1,-1,1,-1,0,-1,1,1,-1,-1,1,1,1,-1,1,1,0,1,1,-1,-1,-1,0,0,1,-1,1,0,0,1,-1,0,-1,1,-1,0,-1,0
%N mu(prime(n)+1) - mu(prime(n)-1), where mu is the Moebius function.
%C This difference is always -1, 0 or 1 because for odd prime p, both p-1 and p+1 cannot be squarefree; one of them will be divisible by 4. This also implies that terms in this sequence are zero only for primes p such that mu(p-1) = mu(p+1) = 0, which is A075432.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MoebiusFunction.html">Moebius Function</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendreSymbol.html">Legendre Symbol</a>
%F Let p = prime(n), then a(n) = (-1/p) mu(p+(-1/p)), where (-1/p) is the Legendre symbol, A070750. (Pieter Moree)
%t Table[MoebiusMu[Prime[n]+1] - MoebiusMu[Prime[n]-1], {n, 2, 150}]
%t MoebiusMu[#+1]-MoebiusMu[#-1]&/@Prime[Range[2,110]] (* _Harvey P. Dale_, Sep 16 2018 *)
%Y Cf. A089451 (mu(p-1) for prime p), A089495 (mu(p+1) for prime p), A089496 (mu(p+1)+mu(p-1) for prime p).
%K sign
%O 2,1
%A _T. D. Noe_, Nov 04 2003