%I #8 May 21 2016 22:42:25
%S 4,49,529,4489,38809,344569,363609,375769,444889,558009,597529,700569,
%T 7198489,35366809,44448889,65983129,4444488889,5587114009,83574762649,
%U 335330171929,359763638809,390241344249,403831017529,407200963129,435775577689,444444888889,453557800089
%N Squares that remain squares if you decrease them by 3 times a repunit with the same number of digits.
%C Apart from the initial term, any number ends in 9.
%H Giovanni Resta, <a href="/A273230/b273230.txt">Table of n, a(n) for n = 1..10000</a>
%e 4 - 3*1 = 1 = 1^2;
%e 49 - 3*11 = 16 = 4^2;
%e 529 - 3*111 = 196 = 14^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,3);
%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_] := 3 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* _Giovanni Resta_, May 18 2016 *)
%Y Cf. A002275, A061844, A273229, A273231-A273234.
%K nonn,easy,base
%O 1,1
%A _Paolo P. Lava_, May 18 2016