login
Number of divisors d of n such that d+2 is also a divisor of n.
5

%I #25 Feb 01 2021 22:08:12

%S 0,0,1,1,0,1,0,1,1,0,0,3,0,0,2,1,0,1,0,1,1,0,0,4,0,0,1,1,0,2,0,1,1,0,

%T 1,3,0,0,1,2,0,1,0,1,2,0,0,4,0,0,1,1,0,1,0,1,1,0,0,5,0,0,2,1,0,1,0,1,

%U 1,1,0,4,0,0,2,1,0,1,0,2,1,0,0,4,0,0,1,1,0,2,0,1,1,0,0,4,0,0,2,1,0,1,0,1,3

%N Number of divisors d of n such that d+2 is also a divisor of n.

%C Number of r X s rectangles with integer sides such that r < s, r + s = 2n, r | s and (s - r) | (s * r). - _Wesley Ivan Hurt_, Apr 24 2020

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

%F 0 <= a(n) <= a(m*n) for all m>0;

%F a(A099477(n)) = 0; a(A059267(n)) > 0;

%F a(A099476(n)) = n and a(m) <> n for m < A099476(n).

%F For n>0: a(A008585(n))>0, a(A008586(n))>0 and a(A008588(n))>0.

%F a(n) = Sum_{i=1..n-1} chi((2*n-i)/i) * chi(i*(2*n-i)/(2*n-2*i)), where chi(n) = 1 - ceiling(n) + floor(n). - _Wesley Ivan Hurt_, Apr 24 2020

%p A099475:= proc(n)

%p local d;

%p d:= numtheory:-divisors(n);

%p nops(d intersect map(`+`,d,2))

%p end proc:

%p map(A099475,[$1..1000]); # _Robert Israel_, Jun 19 2015

%t a[n_] := DivisorSum[n, Boole[Divisible[n, #+2]]&]; Array[a, 105] (* _Jean-François Alcover_, Dec 07 2015 *)

%o (PARI) A099475(n) = { sumdiv(n, d, ! (n % (d+2))) } \\ _Michel Marcus_, Jun 18 2015

%Y Cf. A007862 (similar but with d+1 instead).

%Y Cf. A008585, A008586, A008588.

%Y Cf. A059267, A099476, A099477.

%K nonn,easy

%O 1,12

%A _Reinhard Zumkeller_, Oct 18 2004