user
A Practical number P has some selection of its proper divisors, (other than
itself), that can be selected to sum to every integer less than itself.

Compute all the proper divisors/factors of an input number X, then, using all selections from
the factors compute all possible sums of factors and see if all numbers from 1
to X-1 can be created from it.

Task

Write a function that given X returns a boolean value of whether X *is* a
Practical number, (using the above method).

* Show how many Practical numbers there are in the range 1..333, inclusive.
* Show that the Practical numbers in the above range start and end in:

:   1, 2, 4, 6, 8, 12, 16, 18, 20, 24 ... 288, 294, 300, 304, 306, 308, 312, 320, 324, 330

Stretch Goal

* Show if 666 is a Practical number
assistant
```
use Prime::Factor:ver<0.3.0+>;

sub is-practical ($n) {
   return True  if $n == 1;
   return False if $n % 2;
   my @proper = $n.&proper-divisors :sort;
   return True if all( @proper.rotor(2 => -1).map: { .[0] / .[1] >= .5 } );
   my @proper-sums = @proper.combinations».sum.unique.sort;
   +@proper-sums < $n-1 ?? False !! @proper-sums[^$n] eqv (^$n).list ?? True !! False
}

say "{+$_} matching numbers:\n{.batch(10)».fmt('%3d').join: "\n"}\n"
    given [ (1..333).hyper(:32batch).grep: { is-practical($_) } ];

printf "%5s is practical? %s\n", $_, .&is-practical for 666, 6666, 66666, 672, 720;

```

Output:

```
77 matching numbers:
  1   2   4   6   8  12  16  18  20  24
 28  30  32  36  40  42  48  54  56  60
 64  66  72  78  80  84  88  90  96 100
104 108 112 120 126 128 132 140 144 150
156 160 162 168 176 180 192 196 198 200
204 208 210 216 220 224 228 234 240 252
256 260 264 270 272 276 280 288 294 300
304 306 308 312 320 324 330

  666 is practical? True
 6666 is practical? True
66666 is practical? False
  672 is practical? True
  720 is practical? True
```