login
A061844
Squares that remain squares if you decrease every digit by 1.
12
1, 36, 3136, 24336, 5973136, 71526293136, 318723477136, 264779654424693136, 24987377153764853136, 31872399155963477136, 58396845218255516736, 517177921565478376336, 252815272791521979771662766736, 518364744896318875336864648336, 554692513628187865132829886736
OFFSET
1,2
COMMENTS
The terms may be calculated efficiently by solving x^2 - y^2 = 111...1; this is done by factoring 111..1 = (x + y)(x - y).
Note that some solutions will produce a square containing a zero digit so the solution is impermissible; for example, 460^2 - 317^2 = 111111 but 460^2 = 211600. - Wendy Appleby, Sep 20 2015
Except for a(1) = 1, we don't allow decreasing the digits to create a leading 0. Thus 126736 = 356^2 is not included, even though 126736 - 111111 = 15625 = 125^2. - Robert Israel, Dec 30 2015
If it exists, a(79) > 10^262. - Max Alekseyev, Sep 05 2023
From Robert Israel, Jan 04 2016: (Start)
The sequence may well be finite.
It is known that A000005(n) = O(n^epsilon) for all epsilon>0.
Therefore if 1 < c < 10/9, for d sufficiently large (10^d-1)/9 has fewer than c^d divisors, and thus fewer than c^d possible candidates for x^2 having d digits.
Heuristically, x^2 has probability ~ (9/10)^d of having no digits 0.
Thus we expect fewer than (9c/10)^d terms having d digits.
Since Sum_d (9c/10)^d converges, we expect only finitely many terms.
Of course, this is only a heuristic argument, but it seems to fit well with the data. (End)
LINKS
FORMULA
a(n) = A048379(A061843(n)). - Max Alekseyev, Jul 26 2023
EXAMPLE
13225 = 115^2 and 24336 = 156^2.
MAPLE
A:= {1}:
for d from 1 to 96 do
r:= (10^d-1)/9;
f:= subs(X=10, factors((X^d-1)/(X-1))[2]);
q:= map(t -> op(map(s -> [s[1], t[2]*s[2]], ifactors(t[1])[2])), f);
divs:= {1};
for t in q do
divs:= map(x -> seq(x*t[1]^j, j=0..t[2]), divs)
od;
for t in select(s -> s^2 > r, divs) do
x:= (t + r/t)/2;
if ilog10(x^2) = d-1 and x^2 > 2*10^(d-1) and not has(convert(x^2, base, 10), 0) then
A:= A union {x^2};
fi
od
od:
sort(convert(A, list)); # Robert Israel, Dec 30 2015
MATHEMATICA
For[digits = 1, digits <= 30, digits++, n = (10^digits - 1)/9; divList = Select[Divisors[n], (#1 >= Sqrt[n])&]; For[j = 1, j <= Length[divList], j++, x = (divList[[j]] + n/divList[[j]])/2; y = (divList[[j]] - n/divList[[j]])/2; dx = IntegerDigits[x^2]; dy = IntegerDigits[y^2]; If[(Length[dx] == digits) && (Length[dy] == digits) && (Select[dx, (#1 == 0)&] == {}), Print[x^2]]]]
Flatten@Prepend[Table[Select[#[[Ceiling[(Length[#] + 1)/2] ;; ]] &@(# + Reverse@#)/2 &@Divisors[(10^n - 1)/9], IntegerLength[#^2] == n && (#[[1]] != 1 && FreeQ[#, 0]&[IntegerDigits[#^2]])&]^2, {n, 30}], 1] (* JungHwan Min, Dec 29 2015 *)
Join[{1}, Select[Select[Flatten[Table[#^2&/@(x/.Solve[{x^2-y^2 == FromDigits[ PadRight[{}, n, 1]], x>0, y>0}, {x, y}, Integers]), {n, 2, 30}]], DigitCount[ #, 10, 0]==0&&IntegerDigits[#][[1]]>1&]// Union, IntegerQ[ Sqrt[ FromDigits[IntegerDigits[#]-1]]]&]] (* Harvey P. Dale, Apr 16 2016 *)
CROSSREFS
KEYWORD
base,nonn,nice
AUTHOR
Erich Friedman, Jun 23 2001
EXTENSIONS
More terms and program from Jonathan Cross (jcross(AT)wcox.com), Oct 08 2001
STATUS
approved