Generate a number which has sequence 11101

In reply to abhiverif:

I am going to have to assume you mean you would like to generate random values which has this pattern of bits (11101) to be present within a larger value.
If so, then I suggest:

module top;
class A;
   rand bit [31:0] value;
   rand int unsigned position;
   bit [4:0] pattern = 5'b11101;
   parameter mask = {$bits(pattern){1'b1}};
   constraint c { (value & (mask << position)) == (pattern << position);
      position <= $bits(value)-$bits(pattern);}
endclass
   A a = new;
   initial repeat (30) begin
      assert(a.randomize());
      $display("%2d %b",a.position, a.value);
      end
endmodule

If not, then please give an example of results you would like to see.