cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A346774 Numbers whose square starts and ends with exactly 2 identical digits.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Aug 03 2021

Keywords

Comments

The terminal digits are 00 or 44.

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.
		

Crossrefs

Subsequence of A346678.

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