Task
a(1) = 1; for n > 1, a(n) = largest proper divisor of n, where n < 101 .


$ include "seed7_05.s7i";
 
const func integer: largestProperDivisor (in integer: number) is func
  result
    var integer: divisor is 0;
  begin
    if not odd(number) then
      divisor := number >> 1;
    else
      divisor := number div 3 - 1;
      if odd(divisor) then
        divisor +:= 2;
      else
        incr(divisor);
      end if;
      while number rem divisor <> 0 do
        divisor -:= 2;
      end while;
    end if;
  end func;
 
const proc: main is func
  local
    var integer: n is 0;
  begin
    for n range 1 to 100 do
      write(largestProperDivisor(n) lpad 3);
      if n rem 10 = 0 then
        writeln;
      end if;
    end for;
  end func;