NumSelfDivisors java

Java
b.
public static int[] firstNumSelfDivisors(int start, int num)
  {
    int[] a = new int[num]; 1
    int count = 0;
    int n = start;
    while (count < num)
    {
      if (isSelfDivisor(n))
      {
        a[count] = n;
        count++;
      }
      n++;
    }
    return a;
  }
Source

Also in Java: