%I #29 Oct 09 2023 11:51:06
%S 0,0,1,1,1,1,1,2,1,2,1,2,1,2,2,2,1,3,1,2,2,2,1,4,1,2,2,3,1,3,1,3,2,2,
%T 2,4,1,2,2,4,1,3,1,3,3,2,1,5,1,3,2,3,1,4,2,3,2,2,1,6,1,2,3,3,2,4,1,3,
%U 2,4,1,5,1,2,3,3,2,4,1,5,2,2,1,6,2,2,2,4,1,5,2,3,2,2,2,6,1,3,3,4,1,4,1,4,4
%N Number of numbers d dividing n such that d >= 3 and n/d <= d-2.
%H Nathaniel Johnston, <a href="/A033831/b033831.txt">Table of n, a(n) for n = 1..10000</a>
%F G.f.: Sum_{n>=1} x^(n^2+2*n)/(1-x^n). - _Vladeta Jovovic_, May 13 2008
%F a(n) = floor(A000005(n)/2) - 1 if n is oblong (A002378); and floor(A000005(n)/2) otherwise. - _Max Alekseyev_, Oct 09 2023
%p with(numtheory): for n from 1 to 200 do it := divisors(n): count := 0: for i from 1 to nops(it) do if it[i]>=3 and 1<=n/it[i] and n/it[i]<=(it[i]-2) then count := count+1 fi :od: printf(`%d,`,count) od:
%t a[n_] := DivisorSum[n, 1&, # > 2 && n/# < #-1 &]; Array[a, 100] (* _Amiram Eldar_, Jun 11 2019 *)
%o (PARI) a(n) = sumdiv(n, d, (d>=3) && (q=n/d) && (q>=1) && (q<=d-2)); \\ _Michel Marcus_, Nov 05 2014
%o (PARI) a033831(n) = numdiv(n)\2 - issquare(4*n+1); \\ _Max Alekseyev_, Oct 09 2023
%Y Cf. A002378.
%K easy,nonn
%O 1,8
%A _Naohiro Nomoto_
%E More terms from _James A. Sellers_, Jun 20 2000