OFFSET
1,1
COMMENTS
EXAMPLE
2357 is a term because 2357^2 = 5555449 starts with four 5's.
10541 is not a term because 10541^2 = 111112681 starts with five 1's.
MATHEMATICA
q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]]; Select[Range[100, 33350], q] (* Amiram Eldar, Aug 08 2021 *)
PROG
(Python)
def ok(n):
s = str(n*n)
return len(s) > 4 and s[0] == s[1] == s[2] == s[3] != s[4]
print(list(filter(ok, range(33343)))) # Michael S. Branicky, Aug 08 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Aug 08 2021
STATUS
approved