%I #8 May 21 2016 22:43:28
%S 9,64,676,6084,56644,556516,605284,669124,702244,743044,784996,835396,
%T 8538084,55562116,60497284,79673476,6049417284,7028810244,96560590564,
%U 555838838116,567620600836,575774404804,604938617284,612115334884,619365852004,643617898564,817422124996
%N Squares that remain squares if you decrease them by 5 times a repunit with the same number of digits.
%C Apart from the initial term, any number ends in 4 or 6.
%H Giovanni Resta, <a href="/A273232/b273232.txt">Table of n, a(n) for n = 1..10000</a>
%e 9 - 5*1 = 4 = 2^2;
%e 64 - 5*11 = 9 = 3^2;
%e 676 - 5*111 = 121 = 11^2.
%p P:=proc(q,h) local n; for n from 1 to q do
%p if type(sqrt(n^2-h*(10^(ilog10(n^2)+1)-1)/9),integer) then print(n^2);
%p fi; od; end: P(10^9,5);
%t sol[k_] := Block[{x, e = IntegerLength@k, d = Divisors@ k}, Union[ #+k/# & /@ Select[ Take[d, Ceiling[ Length@d/2]], EvenQ[x = #+k/#] && IntegerLength[ x^2/4] == e &]]^2/4]; r[n_] := 5 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* _Giovanni Resta_, May 18 2016 *)
%Y Cf. A002275, A061844, A273299-A273231, A273233, A273234.
%K nonn,easy,base
%O 1,1
%A _Paolo P. Lava_, May 18 2016