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”).

a(1) = 1; for n > 1, choose a(n) so that Sum_{1 <= k <= n, gcd(k,n+1)=1} a(k) = 0.
2

%I #30 Oct 26 2020 16:06:39

%S 1,-1,-1,1,-1,1,1,-1,-1,1,-1,1,3,-3,-1,1,-3,3,1,-1,1,-1,-1,-1,5,-1,-1,

%T -1,-1,1,-1,1,-3,5,-3,1,7,-5,-1,-1,-9,9,5,3,3,-11,-3,7,7,9,-1,-19,-7,

%U 17,11,9,-7,-23,1,-1,-1,37,1,-33,-1,-3,-3,15,27,-39,-7,7,-9,47,-13,-37,11,1,-5,51,-9,-37,19,17,-5,-1,13,-43,-5,-3,13

%N a(1) = 1; for n > 1, choose a(n) so that Sum_{1 <= k <= n, gcd(k,n+1)=1} a(k) = 0.

%H Robert Israel, <a href="/A096433/b096433.txt">Table of n, a(n) for n = 1..10000</a>

%H Hamed Mousavi and Maxie D. Schmidt, <a href="https://arxiv.org/abs/1810.08373">Factorization Theorems for Relatively Prime Divisor Sums, GCD Sums and Generalized Ramanujan Sums</a>, arXiv:1810.08373 [math.NT], 2018. See Remark 2.2, pp. 6-7.

%F a(n) = -Sum_{1 <= k <= n-1, gcd(k, n+1) = 1} a(k).

%e a(7) = 1 since the positive integers < 8 and coprime to 8 are 1, 3, 5, 7, and thus a(1) + a(3) + a(5) + a(7) = 1 - 1 - 1 + 1 = 0.

%p A:= Vector(100):

%p A[1]:= 1:

%p for n from 2 to 100 do

%p A[n]:= -convert(A[select(t -> igcd(t,n+1)=1, [$1..n-1])],`+`)

%p od:

%p convert(A,list); # _Robert Israel_, Oct 26 2020

%t a[1] = 1; a[n_] := a[n] = Block[{k = Select[ Range[n - 1], GCD[ #, n + 1] == 1 &]}, -Plus @@ (a /@ k)]; Table[ a[n], {n, 94}] (* _Robert G. Wilson v_, Aug 24 2004 *)

%K sign

%O 1,13

%A _Leroy Quet_, Aug 10 2004

%E Edited and extended by _Robert G. Wilson v_, Aug 24 2004