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

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

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