Let the number be abcd
As given the sum of the numbers is 21, then [tex]a+b+c+d=21[/tex]
[tex]d=c+1[/tex]
[tex]d=a-1[/tex]
[tex]b=c^{2}[/tex]
As both 'd' are equal, we have
[tex]a-1=c+1[/tex]
[tex]c=a-2[/tex] and [tex]b=(a-2)^{2}[/tex]
Now, we will substitute for b , c and d in the first equation we get
[tex]a+(a-2)^{2}+a-2+a-1=21[/tex]
[tex]a+a^{2}-4a+4+a-2+a-1=21[/tex]
[tex]a^{2}-a-20=0[/tex]
[tex]a^{2}-5a+4a-20=0[/tex]
[tex]a(a-5)+4(a-5)=0[/tex]
[tex](a+4)(a-5)=0[/tex]
[tex]a=-4 and a=5[/tex]
Neglect the negative value. So a = 5
Hence, the first number is = 5
As d=a-1, so d=5-1 = 4
As c=d-1, so c=4-1=3
As b=[tex]c^{2}[/tex] = [tex]3^{2}=9[/tex]
Hence, the number is 5934 .