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

A346774 Numbers whose square starts and ends with exactly 2 identical digits.

Original entry on oeis.org

88, 150, 210, 212, 338, 340, 470, 580, 670, 880, 940, 1050, 1060, 1062, 1070, 1080, 1088, 1090, 1488, 1510, 1512, 1820, 1830, 1838, 1840, 2110, 2112, 2120, 2350, 2360, 2362, 2570, 2580, 2588, 2780, 2790, 2970, 3150, 3160, 3320, 3330, 3350, 3360, 3362, 3370, 3380, 3388, 3390, 3410
Offset: 1

Views

Author

Bernard Schott, Aug 03 2021

Keywords

Comments

The terminal digits are 00 or 44.

Examples

			150 is a term because 150^2 = 22500.
212 is a term because 212^2 = 44944 (smallest square with 2 times two 4's).
2788 is not a term because 2788^2 = 7772944.
		

Crossrefs

Subsequence of A346678.

Programs

  • Mathematica
    Select[Range[32, 3500], (d = IntegerDigits[#^2])[[1]] == d[[2]] != d[[3]] && d[[-1]] == d[[-2]] != d[[-3]] &] (* Amiram Eldar, Aug 03 2021 *)
  • Python
    def ok(n):
        s = str(n*n)
        if len(s) < 4: return False # there are no ok squares with < 4 digits
        return s[0] == s[1] != s[2] and s[-1] == s[-2] != s[-3]
    print(list(filter(ok, range(3411)))) # Michael S. Branicky, Aug 03 2021

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.

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
    

A174499 Smallest number whose square starts and ends with (at least) n identical digits.

Original entry on oeis.org

1, 88, 10538, 235700, 10541000, 57735000, 7453560000, 14907120000, 18257418600000, 29814239700000, 298142397000000, 1490711985000000, 14907119850000000, 105409255338950000000, 7453559924999300000000, 10540925533894600000000
Offset: 1

Views

Author

Michel Lagneau, Feb 22 2011

Keywords

Comments

For n > 3 the last n identical digits are zeros. Proof:
For n = 3, the numbers a(n) == {0, 38, 100, 200, 300, 400, 462, 500, 538, 600, 700, 800, 900, 962} mod 1000, but for n = 4, if the suffix is different from zero, a(n) == {38, 462, 538, 962} mod 1000, and for d from [1..9], (d038)^2 <> 4444 (mod 10000), (d462)^2 <> 4444 (mod 10000), (d538)^2 <> 4444 (mod 10000), (d962)^2 <> 4444 (mod 10000).
Differs from A346926 where exactly n identical digits are required. - Bernard Schott, Aug 08 2021

Examples

			a(3) = 10538 because 10538^2 = 111049444 starts and ends in 3 identical digits.
a(5) = 10541000 because 10541000^2 = 111112681000000 starts with 5 identical digits and ends with 6 identical digits.
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..100):p0:=10:for k from 2 to 10 do: id:= 0:for p
      from p0 to 100000000 while(id=0) do:n:=p^2:l:=length(n):n0:=n:for m from 1 to
      l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :T[m]:=u:od:z:=0:for a from 1
      to k-1 do: if T[l]=T[l-a] and T[1]=T[1+a] then z:=z+1:else fi:od:if z=k-1 then
      print(p):id:=1:p0:=p:else fi:od:od:

Formula

For n > 3, a(n) = A119998(n)*10^q, q = floor(n+1)/2. [corrected by Bernard Schott, Aug 08 2021]

Extensions

Name clarified and a(10) and a(12) corrected by Bernard Schott, Aug 08 2021
Showing 1-4 of 4 results.