Find all positive integers $a\in \{1,2,3,4\}$ such that if $b=2a$, then there exist infinitely many positive integers $n$ such that $$\underbrace{aa\dots aa}_\textrm{$2n$}-\underbrace{bb\dots bb}_\textrm{$n$}$$ is a perfect square.
Source: Junior Olympiad of Malaysia 2013 P2
Tags: number theory
Find all positive integers $a\in \{1,2,3,4\}$ such that if $b=2a$, then there exist infinitely many positive integers $n$ such that $$\underbrace{aa\dots aa}_\textrm{$2n$}-\underbrace{bb\dots bb}_\textrm{$n$}$$ is a perfect square.