%I #12 Dec 09 2017 03:56:13
%S 1,0,0,2,2,0,0,3,0,0,0,0,0,0,5,0,0,6,6,0,0,7,7,0,0,8,0,0,0,0,0,0,10,0,
%T 0,11,11,0,0,12,12,0,0,13,0,0,0,0,0,0,15,0,0,16,16,0,0,17,17,0,0,18,0,
%U 0,0,0,0,0,20,0,0,21,21,0,0,22,22,0,0,23,0,0,0,0,0,0,25,0,0,26,26,0,0,27,27
%N a(n) is the positive integer such that Sum_{k>=0} floor(n/(a(n)+k)) = n, or 0 if there is no such positive integer.
%e For n = 8: floor(8/3) + floor(8/4) + floor(8/5) + floor(8/6) + floor(8/7) + floor(8/8) = 2 + 2 + 1 + 1 + 1 + 1 = 8. So a(8) = 3. For n = 6: floor(6/2) + floor(6/3) + floor(6/4) + floor(6/5) + floor(6/6) = 3 + 2 + 1 + 1 + 1 = 8, which is > 6. But floor(6/3) + floor(6/4) + floor(6/5) + floor(6/6) = 2 + 1 + 1 + 1 = 5, which is < 6. So a(6) = 0, because there is no integer at which to start the sequence of denominators so that the sum is 6.
%p A145264 := proc(n) local a,k; for a from 1 to n do if add( floor(n/(a+k)),k=0..n-a) = n then RETURN(a) ; fi; od: RETURN(0) ; end: for n from 1 to 120 do printf("%d,",A145264(n)) ; od: # _R. J. Mathar_, Oct 07 2008
%Y Cf. A145265, A145266.
%K nonn
%O 1,4
%A _Leroy Quet_, Oct 05 2008
%E More terms from _R. J. Mathar_, Oct 07 2008