Вот что у меня выходит программы.
Помогите на писать правильно код что бы когда  число веденное пользователям было квадратом палиндромы.Числом называют квадратом палиндромы,когда оно есть квадратом определенного натурального числа и может читаться с право налево и слева на право.
к примеру(11).При 3-ой кнопке должно выводиться это число.
 unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    Button2: TButton;
    Label2: TLabel;
    Button3: TButton;
    Label3: TLabel;
    Edit1: TEdit;
    Label4: TLabel;
    Label5: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
   i,n,a,b:Integer;
      polen:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
n:=StrToInt(Edit1.Text);
polen:=0;
if  n>0 then Label4.Caption:='Результат:  '  else
  Label5.Caption:='Введите число:';
 polen:=(sqr(n));
      for i:=1 to n do
    begin
      polen:=polen+i;
      if i=n then
        Label4.Caption:=Label4.Caption+IntToStr(polen)+'.'
      else
        Label4.Caption:=Label4.Caption+IntToStr(polen)+','+''
    end
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
n:=StrToInt(Edit1.Text);
polen:=0;
if n>0 then  Label4.Caption:='Результат:  'else
  Label5.Caption:='Введите число:';
   polen:=(sqr(n));
    if polen=0 then polen:=polen-1;
    n:=0;
    for i:=1 to polen do
    begin
      n:=n+i;
      if i=polen then
        Label4.Caption:=Label4.Caption+IntToStr(n)+'. '
      else
        Label4.Caption:=Label4.Caption+IntToStr(n)+','+''
    end
end;
procedure TForm1.Button3Click(Sender: TObject);
var s,s1:string;
    
begin
{n-число заданное пользывателем}n:=StrToInt(Edit1.Text);
polen:=0;
s:=FloatToStr(polen);
if n>0 then  Label4.Caption:='Результат:  'else
  Label5.Caption:='Введите число:';
      polen:=(sqr(n));
     a:=StrToInt(s);
     if a=n then Label4.Caption:=(IntToStr(a))+ '  Это число "полендромы"';
    if polen=0 then
      Label4.Caption:='  Это число "полендромы"'
    else
      Label4.Caption:='  Это не число "полендромы" '
end;
end.