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-6 of 6 results.

A346678 Positive numbers whose squares end in exactly two identical digits.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Jul 29 2021

Keywords

Comments

When a square ends in exactly two identical digits, these digits are necessarily 00 or 44, so all terms are even.
The numbers are of the form: 10*floor((10*k-1)/9), k > 0, or, 50*floor((10*k-1)/9) +- 38, k > 0.
Equivalently: m is in the sequence iff either (m == 0 (mod 10) and m <> 0 (mod 100)) or (m == +- 38 (mod 50) and m <> +- 38 (mod 500)).

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.
		

Crossrefs

Equals A186438 \ A186439.
Supersequence of A346774.

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.

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

A346812 Positive numbers whose square starts with exactly 2 identical digits.

Original entry on oeis.org

15, 21, 34, 47, 58, 67, 88, 94, 105, 106, 107, 108, 109, 150, 151, 182, 183, 184, 210, 211, 212, 235, 236, 257, 258, 278, 279, 297, 315, 316, 332, 333, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 470, 471, 473, 474, 475, 476, 477, 478, 479, 575, 576, 577, 578, 579, 580, 581
Offset: 1

Views

Author

Bernard Schott, Aug 05 2021

Keywords

Comments

If m is a term, then 10*m is another term.

Examples

			34 is a term because 34^2 = 1156.
149 is not a term because 149^2 = 22201.
		

Crossrefs

Subsequence of A123912.
A346774 is a subsequence.
Cf. A186438, A186439, A346678 (similar, with "ends").

Programs

  • Mathematica
    Select[Range[10, 600], (d = IntegerDigits[#^2])[[1]] == d[[2]] != d[[3]] &] (* Amiram Eldar, Aug 05 2021 *)
  • PARI
    isok(m) = my(d=digits(m^2)); (#d > 2) && (d[2] == d[1]) && (d[3] != d[2]); \\ Michel Marcus, Aug 05 2021
  • Python
    def ok(n): s = str(n*n); return len(s) > 2 and s[0] == s[1] != s[2]
    print(list(filter(ok, range(582)))) # Michael S. Branicky, Aug 05 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

A346926 a(n) is the smallest positive integer whose square starts and ends with exactly n identical digits, and a(n) = 0 when there is no such integer.

Original entry on oeis.org

1, 88, 10538, 235700, 0, 57735000, 0, 14907120000, 0, 235702260400000, 0, 7453559925000000, 0, 105409255338950000000, 0, 10540925533894600000000, 0, 14907119849998598000000000, 0, 74535599249992989880000000000, 0, 210818510677891955466600000000000, 0
Offset: 1

Views

Author

Bernard Schott, Aug 07 2021

Keywords

Comments

When a square ends in exactly three identical digits, these digits are necessarily 444 (A039685).
When a square ends with n > 3 identical digits, these last digits are necessarily 0's, and also this is only possible when n is even.
Differs from A174499 where only at least n identical digits are required.

Examples

			a(2) = 88 because 88^2 = 7744 starts with two 7's and ends with two 4's, and 88 is the smallest integer whose square starts and ends with exactly 2 identical digits.
a(4) = 235700 because 235700^2 = 55554490000 starts with four 5's and ends with four 0's, and 235700 is the smallest integer whose square starts and ends with exactly 4 identical digits.
		

Crossrefs

Formula

a(2*n+1) = 0 for n >= 2.
a(2*n) = A119511(2*n) * 10^n, for n >= 2.

A348831 Positive numbers whose square starts and ends with exactly 44, and no 444.

Original entry on oeis.org

212, 2112, 6638, 6662, 6688, 20988, 21012, 21062, 21112, 21138, 21162, 21188, 21212, 66338, 66362, 66388, 66412, 66438, 66488, 66512, 66562, 66588, 66612, 66712, 66738, 66762, 66788, 66812, 66838, 66862, 66888, 66912, 66938, 66988, 67012, 67062, 209762, 209788
Offset: 1

Views

Author

Bernard Schott, Nov 08 2021

Keywords

Comments

When a square starts and ends with digits dd, then dd is necessarily 44.
The last 2 digits of terms are either 12, 38, 62 or 88.
From Marius A. Burtea, Nov 09 2021 : (Start)
The sequence is infinite because the numbers 212, 2112, 21112, ..., (19*10^k + 8) / 9, k >= 3, are terms because the remainder when dividing by 1000 is 544 and 445*10^(2*k - 2) < ((19*10^k + 8) / 9)^2 < 447*10^(2*k - 2), k >= 3.
Also 6638, 66338, 663338, 6633338, 66333338, 663333338, 6633333338, ..., (199*10^k + 14) / 3, k >= 2, are terms and have no digits 0, because their squares are: 44063044, 4400730244, 4400730244, 440017302244, 44001173022244, 4400111730222244, 440011117302222244, ... (End)

Examples

			212 is a term since 212^2 = 44944.
662 is not a term since 662^2 = 438244.
668 is not a term since 668^2 = 446224.
2108 is not a term since 2108^2 = 4443664.
21038 is not a term since 21038^2 = 442597444.
21088 is not a term since 21088^2 = 444703744.
		

Crossrefs

Cf. A017317.
Subsequence of A045858, A273375, A305719 and A346774.
Similar to: A348488 (d=4), this sequence (dd=44), A348832 (ddd=444).

Programs

  • Magma
    fd:=func; fs:=func; [n:n in [1..210000]|fd(n) and fs(n)]; // Marius A. Burtea, Nov 08 2021
    
  • Mathematica
    Select[Range[10, 300000], (d = IntegerDigits[#^2])[[1 ;; 2]] ==  d[[-2 ;; -1]] == {4, 4} && d[[-3]] != 4 && d[[3]] != 4 &] (* Amiram Eldar, Nov 08 2021 *)
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("4")) == len(s.lstrip("4")) == len(s)-2
    def aupto(N):
      ends = [12, 38, 62, 88]
      r = takewhile(lambda x: x<=N, (100*i+d for i in count(0) for d in ends))
      return [k for k in r if ok(k)]
    print(aupto(209788)) # Michael S. Branicky, Nov 08 2021
Showing 1-6 of 6 results.