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.

A346891 Positive numbers whose square starts with exactly 3 identical digits.

Original entry on oeis.org

149, 298, 334, 472, 667, 745, 882, 1054, 1055, 1056, 1057, 1058, 1490, 1491, 1492, 1493, 1825, 1826, 1827, 2108, 2109, 2356, 2581, 2788, 2789, 2980, 2981, 3161, 3162, 3332, 3333, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346
Offset: 1

Views

Author

Bernard Schott, Aug 06 2021

Keywords

Comments

If m is a term 10*m is another term.
2357 is the first term of A131573 that is not in this sequence (see Example section), the next ones are 2582, 3334, ...

Examples

			149 is a term because 149^2 = 22201 starts with three 2's.
2357 is not a term because 2357^2 = 5555449 starts with four 5's.
		

Crossrefs

Subsequence of A131573.
Cf. A039685 (similar, with "ends"), A346812 (similar, with 2), A346892.

Programs

  • Mathematica
    Select[Range[32, 3350], (d = IntegerDigits[#^2])[[1]] == d[[2]] == d[[3]] != d[[4]] &] (* Amiram Eldar, Aug 06 2021 *)
  • Python
    def ok(n): s = str(n*n); return len(s) > 3 and s[0] == s[1] == s[2] != s[3]
    print(list(filter(ok, range(3347)))) # Michael S. Branicky, Aug 06 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.

A348832 Positive numbers whose square starts and ends with exactly 444.

Original entry on oeis.org

666462, 666538, 666962, 667038, 2107462, 2107538, 2107962, 2108038, 2108462, 2108538, 2108962, 2109038, 2109462, 6663462, 6663538, 6663962, 6664038, 6664462, 6664538, 6664962, 6665038, 6665462, 6665538, 6665962, 6666038, 6667462, 6667538, 6667962, 6668038, 6668462, 6668538, 6668962
Offset: 1

Views

Author

Bernard Schott, Nov 09 2021

Keywords

Comments

The 1st problem of British Mathematical Olympiad (BMO) in 1995 (see link) asked to find all positive integers whose squares end in three 4’s (A039685); this sequence is the subsequence of these integers whose squares also start in precisely three 4's (no four or more 4's). Two such infinite subsequences are proposed below.
When a square starts and ends with digits ddd, then ddd is necessarily 444.
The first 3 digits of terms are either 210, 666 or 667, while the last 3 digits are either 038, 462, 538 or 962 (see examples).
From Marius A. Burtea, Nov 09 2021 : (Start)
The sequence is infinite because the numbers 667038, 6670038, 66700038, 667000038, ..., 667*10^k + 38, k >= 3, are terms because are square 444939693444, 44489406921444, 4448895069201444, 444889050692001444, 44488900506920001444, ...
Also, 6663462, 66633462, 666333462, 6663333462, ..., (1999*10^k + 386) / 3, k >= 4, are terms and have no digits 0, because their squares are 44401725825444, 4440018258105444, 444000282580905444, 44400012825808905444,
4440001128258088905444, ... (End)

Examples

			666462 is a term since 666462^2 = 444171597444.
21038 is not a term since 21038^2 = 442597444.
		

References

  • A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Pb 1 pp. 55 and 95-96 (1995)

Crossrefs

Subsequence of A039685, A045858, A273375, A305719, A346892.
Similar to: A348488 (d=4), A348831 (dd=44), this sequence (ddd=444).

Programs

  • Magma
    fd:=func; fs:=func; [n:n in [1..6700000]|fd(n) and fs(n)]; // Marius A. Burtea, Nov 09 2021
  • Mathematica
    Select[Range[100, 7*10^6], (d = IntegerDigits[#^2])[[1 ;; 3]] == d[[-3 ;; -1]] == {4, 4, 4} && d[[-4]] != 4 && d[[4]] != 4 &] (* Amiram Eldar, Nov 09 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)-3
    def aupto(N):
      ends = [38, 462, 538, 962]
      r = takewhile(lambda x: x<=N, (1000*i+d for i in count(0) for d in ends))
      return [k for k in r if ok(k)]
    print(aupto(6668962)) # Michael S. Branicky, Nov 09 2021
    
Showing 1-4 of 4 results.