是这个意思吗:
procedure TForm1.Button1Click(Sender: TObject);
var
i,num : integer;
str : string;
begin
randomize;
str := '';
for i := 1 to 13do
begin
num := random(3);
if( num = 2)then
num := num + 1;
str := str + inttostr(num);
end;
memo1.Lines.Add(str);
end;