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.

Showing 1-3 of 3 results.

A346892 Numbers whose square starts and ends with exactly 3 identical digits.

Original entry on oeis.org

10538, 33462, 99962, 105462, 105538, 149038, 182538, 298038, 333538, 333962, 334038, 334462, 334538, 471538, 471962, 472038, 577462, 577538, 666462, 666538, 666962, 667038, 745038, 745462, 745538, 816538, 881538, 881962, 882038, 942462, 942538, 999538, 1053962, 1054038, 1054538, 1054962
Offset: 1

Views

Author

Bernard Schott, Aug 06 2021

Keywords

Comments

The terminal digits of the square of terms are necessarily 444.
The last 3 digits of terms are either 038, 462, 538 or 962. - Chai Wah Wu, Oct 02 2021

Examples

			10538 is a term because 10538^2 = 111049444
666462 = A348832(1) is a term because 666462^2 = 444171597444, the smallest square that starts with exactly three 4's and ends also with three 4's.
105462 is a term because 105462^2 = 11122233444 (see A079035).
74538 is not a term because 74538^2 = 5555913444 with four starting 5's.
		

Crossrefs

Intersection of A039685 and A346891.
Cf. A346774 (similar, with 2 identical digits).
A348832 is a subsequence.

Programs

  • Mathematica
    Select[Range[10^3, 10^6], (d = IntegerDigits[#^2])[[1]] == d[[2]] == d[[3]] != d[[4]] && d[[-1]] == d[[-2]] == d[[-3]] != d[[-4]] &] (* Amiram Eldar, Aug 06 2021 *)
  • Python
    def ok(n):
        s = str(n*n)
        if len(s) < 4: return False
        return s[0] == s[1] == s[2] != s[3] and s[-1] == s[-2] == s[-3] != s[-4]
    print(list(filter(ok, range(10**6)))) # Michael S. Branicky, Aug 06 2021
    
  • Python
    A346892_list = [1000*n+d for n in range(10**6) for d in [38,462,538,962] if (lambda x:x[0]==x[1]==x[2]!=x[3])(str((1000*n+d)**2))] # Chai Wah Wu, Oct 02 2021

A346942 Numbers whose square starts and ends with exactly 4 identical digits.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Aug 08 2021

Keywords

Comments

Terms are equal to 100 times the primitive terms of A346940, those that have no trailing zero in decimal representation, hence all terms end with exactly 00.

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).
		

Crossrefs

Numbers whose square '....' with exactly k identical digits:
---------------------------------------------------------------------------
| k \'....'| starts | ends | starts and ends |
---------------------------------------------------------------------------
| k = 2 | A346812 | A346678 | A346774 |
| k = 3 | A346891 | A039685 | A346892 |
| k = 4 | A346940 | 100*A067251 | this sequence |
---------------------------------------------------------------------------
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

A346940 Numbers whose square starts with exactly 4 identical digits.

Original entry on oeis.org

2357, 2582, 3334, 4714, 5774, 6667, 8165, 8819, 9428, 10542, 10543, 10544, 10545, 14907, 14908, 14909, 18257, 18258, 18259, 21081, 21082, 21083, 23570, 23571, 25819, 25820, 27888, 27889, 29813, 29814, 31622, 33332, 33333, 33335, 33336, 33337, 33338, 33339, 33340, 33341, 33342
Offset: 1

Views

Author

Bernard Schott, Aug 08 2021

Keywords

Comments

If m is a term, 10*m is another term.
Differs from A132391 where only at least 4 identical digits are required; indeed, 10541 is the first term of A132391 that is not in this sequence (see Example section), the next one is 33346.

Examples

			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.
		

Crossrefs

Supersequences: A131573, A132391.
Similar with: A346812 (2 digits), A346891 (3 digits).

Programs

  • Mathematica
    q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]]; Select[Range[100, 33350], 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]
    print(list(filter(ok, range(33343)))) # Michael S. Branicky, Aug 08 2021
Showing 1-3 of 3 results.