WITH
  FUNCTION gapful_numbers(p_start IN INTEGER, p_count IN INTEGER) RETURN varchar2 IS
    v_start   INTEGER:= p_start;
    v_count   INTEGER:= 0;
    v_res     varchar2(32767); 
  BEGIN
    v_res:= 'First '||p_count||' gapful numbers starting from '||p_start||': ';
    -- main cycle
    while TRUE loop
      IF MOD(v_start,to_number(substr(v_start,1,1)||substr(v_start,-1))) = 0 THEN 
         v_res:= v_res || v_start; 
         v_count:= v_count + 1;
         exit WHEN v_count = p_count;
         v_res:= v_res || ', ';  
      END IF;
      v_start:= v_start + 1; 
    END loop;
    --
    RETURN v_res;
    --
  END;

--Test
SELECT gapful_numbers(100,30) AS res FROM dual
UNION ALL 
SELECT gapful_numbers(1000000,15) AS res FROM dual
UNION ALL 
SELECT gapful_numbers(1000000000,10) AS res FROM dual;
/