A346942 Numbers whose square starts and ends with exactly 4 identical digits.
235700, 258200, 333400, 471400, 577400, 666700, 816500, 881900, 942800, 1054200, 1054300, 1054400, 1054500, 1490700, 1490800, 1490900, 1825700, 1825800, 1825900, 2108100, 2108200, 2108300, 2357100, 2581900, 2788800, 2788900, 2981300, 2981400, 3162200, 3333200, 3333300
Offset: 1
Examples
258200 is a term because 258200^2 = 66667240000 starts with four 6's and ends with four 0's. 3334700 is not a term because 3334700^2 = 1111155560000 starts with five 1's (and ends with four 0's).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Crossrefs
Numbers whose square '....' with exactly k identical digits:
---------------------------------------------------------------------------
| k \'....'| starts | ends | starts and ends |
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Cf. A346926.
Programs
-
Mathematica
q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]] && SameQ @@ d[[-4 ;; -1]] && d[[-5]] != d[[-1]]; Select[Range[10000, 3333300], q] (* Amiram Eldar, Aug 08 2021 *)
-
Python
def ok(n): s = str(n*n) return len(s) > 4 and s[0] == s[1] == s[2] == s[3] != s[4] and s[-1] == s[-2] == s[-3] == s[-4] != s[-5] print(list(filter(ok, range(3333333)))) # Michael S. Branicky, Aug 08 2021
-
Python
A346942_list = [100*n for n in range(99,10**6) if n % 10 and (lambda x:x[0]==x[1]==x[2]==x[3]!=x[4])(str(n**2))] # Chai Wah Wu, Oct 02 2021
Comments