A346678 Positive numbers whose squares end in exactly two identical digits.
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
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.
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1).
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.
Comments