login
Number of divisors d of 2n such that gcd(d-1,2n/d-1) = 1.
2

%I #10 Apr 23 2024 08:28:42

%S 2,1,2,2,2,4,2,2,4,4,2,6,2,2,6,4,2,6,2,4,6,4,2,8,4,2,6,6,2,10,2,2,4,4,

%T 4,10,2,2,6,8,2,10,2,4,10,4,2,8,4,4,6,6,2,10,6,4,6,4,2,12,2,2,8,6,4,

%U 10,2,4,6,10,2,12,2,2,10,6,4,8,2,6,8,4,2,14,6,2,6,4,2,16,6,4,4,4,4,12,2,2,10

%N Number of divisors d of 2n such that gcd(d-1,2n/d-1) = 1.

%C The corresponding values for odd n are all zero, since then 2 is a common divisor of (d-1,n/d-1).

%H Antti Karttunen, <a href="/A163822/b163822.txt">Table of n, a(n) for n = 1..10080</a>

%H Antti Karttunen, <a href="/A163822/a163822.txt">Data supplement: n, a(n) computed for n = 1..65537</a>

%t a[n_] := DivisorSum[2*n, 1 &, CoprimeQ[#-1, 2*n/#-1] &]; Array[a, 100] (* _Amiram Eldar_, Apr 23 2024 *)

%o (PARI) a(n)=local(d,r);r=0;d=divisors(2*n);for(k=1,#d,if(gcd(d[k]-1,2*n\d[k]-1)==1,r++));r

%Y Cf. A000005, A163823.

%K nonn

%O 1,1

%A _Franklin T. Adams-Watters_, Aug 04 2009