Any square ends with one of [ 0 ], 1, 4, 5, 6, 9, so a(1) = 5.
a(3) =
A000993(3) - a(2) - #{100, 104, 201, 204, 209, 304, 400, 401, 404, 409, 500, 504, 600, 601, 604, 609, 704, 801, 804, 809, 900, 904} = 159 - 18 - 22 = 119, cf.
A122986. -
Reinhard Zumkeller, Mar 21 2010