A346774 Numbers whose square starts and ends with exactly 2 identical digits.
88, 150, 210, 212, 338, 340, 470, 580, 670, 880, 940, 1050, 1060, 1062, 1070, 1080, 1088, 1090, 1488, 1510, 1512, 1820, 1830, 1838, 1840, 2110, 2112, 2120, 2350, 2360, 2362, 2570, 2580, 2588, 2780, 2790, 2970, 3150, 3160, 3320, 3330, 3350, 3360, 3362, 3370, 3380, 3388, 3390, 3410
Offset: 1
Examples
150 is a term because 150^2 = 22500. 212 is a term because 212^2 = 44944 (smallest square with 2 times two 4's). 2788 is not a term because 2788^2 = 7772944.
Programs
-
Mathematica
Select[Range[32, 3500], (d = IntegerDigits[#^2])[[1]] == d[[2]] != d[[3]] && d[[-1]] == d[[-2]] != d[[-3]] &] (* Amiram Eldar, Aug 03 2021 *)
-
Python
def ok(n): s = str(n*n) if len(s) < 4: return False # there are no ok squares with < 4 digits return s[0] == s[1] != s[2] and s[-1] == s[-2] != s[-3] print(list(filter(ok, range(3411)))) # Michael S. Branicky, Aug 03 2021
Comments