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.

A346678 Positive numbers whose squares end in exactly two identical digits.

Original entry on oeis.org

10, 12, 20, 30, 40, 50, 60, 62, 70, 80, 88, 90, 110, 112, 120, 130, 138, 140, 150, 160, 162, 170, 180, 188, 190, 210, 212, 220, 230, 238, 240, 250, 260, 262, 270, 280, 288, 290, 310, 312, 320, 330, 338, 340, 350, 360, 362, 370, 380, 388, 390, 410, 412, 420, 430, 438, 440, 450, 460
Offset: 1

Views

Author

Bernard Schott, Jul 29 2021

Keywords

Comments

When a square ends in exactly two identical digits, these digits are necessarily 00 or 44, so all terms are even.
The numbers are of the form: 10*floor((10*k-1)/9), k > 0, or, 50*floor((10*k-1)/9) +- 38, k > 0.
Equivalently: m is in the sequence iff either (m == 0 (mod 10) and m <> 0 (mod 100)) or (m == +- 38 (mod 50) and m <> +- 38 (mod 500)).

Examples

			12 is in the sequence because 12^2 = 144 ends in two 4's.
20 is in the sequence because 20^2 = 400 ends in two 0's.
38 is not in the sequence because 38^2 = 1444 ends in three 4's.
		

Crossrefs

Equals A186438 \ A186439.
Supersequence of A346774.

Programs

  • Mathematica
    Select[Range[10, 460], (d = IntegerDigits[#^2])[[-1]] == d[[-2]] != d[[-3]] &] (* Amiram Eldar, Jul 29 2021 *)
  • Python
    def ok(n): s = str(n*n); return len(s) > 2 and s[-1] == s[-2] != s[-3]
    print(list(filter(ok, range(461)))) # Michael S. Branicky, Jul 29 2021

Formula

a(n+63) = a(n) + 500.