login
Squares that are the concatenation of x, 1 and x for some x.
3

%I #15 Jan 07 2026 08:39:51

%S 69169,76176,12722025112722025,23671716123671716,26222400126222400,

%T 41494116141494116,50566689150566689,59910025159910025,

%U 71095881171095881,99716676199716676,111913916111119139161,310524204913105242049,371509802513715098025,10920555895396110920555895396,12194596259856112194596259856

%N Squares that are the concatenation of x, 1 and x for some x.

%C Squares of the form (10^(d+1)+1)*x + 10^d where 10^(d-1) <= x < 10^d.

%e a(3) = 12722025112722025 is a term because it is 112791955^2 and is the concatenation of 12722025, 1 and 12722025.

%p Res:= NULL: count:= 0:

%p for d from 2 to 14 do

%p S:= [isolve(10^d + x*(10^(d+1)+1) = y^2)];

%p S:= map(t -> subs(subs(_Z1=0,t),x), S);

%p S:= sort(select(t -> t >= 10^(d-1) and t < 10^d, S));

%p for s in S do

%p t:= (10^(d+1)+1)*s+10^d; Res:= Res,t; count:= count+1;

%p od

%p od:

%p Res;

%o (Python)

%o from math import isqrt

%o from itertools import count, islice

%o def b(n): return 10**len(str(n))*(10*n+1) + n # A392225

%o def agen(): # generator of terms

%o yield from (filter(lambda x: isqrt(x)**2 == x, (b(n) for n in count(1) if n%10 in {0, 1, 4, 5, 6, 9})))

%o g = agen()

%o [print(next(g), end=", ") for n in count(1)] # _Michael S. Branicky_, Jan 04 2026

%Y Intersection of A000290 and A392225.

%K nonn,base

%O 1,1

%A _Robert Israel_, Jan 03 2026