Control over randomization without using constraint

In reply to Shashank Gurijala:

In reply to araj380:


module print_0or3_only;
int var_1;
initial begin
repeat(30) begin
var_1 = 3 * $urandom_range(0,1);
$display("\nvar_1 = %0d",var_1);
end
end
endmodule

what if the values increase…let say now i want to print 0,3,5,6,8,9 then how i can write it in efficient way