Sequence: smallest number greater than previous term with exactly n divisors: Difference between revisions

(Added Algol W)
Line 200:
integer procedure countDivisors ( Integer value n ) ;
begin
integer count, i, i2;
count := 0;
i := 1;
while i *begin ii2 <:= ni do* begini;
i2 < n
end do begin
if n rem i = 0 then count := count + 2;
i := i + 1
end;
if i * ii2 = n then count + 1 else count
end countDivisors ;
 
3,032

edits