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.

A256634 Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 7 as largest digit.

Original entry on oeis.org

740, 760, 1071, 1740, 2074, 2705, 2710, 2740, 2750, 2760, 3705, 3710, 3760, 4071, 4705, 4740, 4760, 5071, 5705, 5760, 6740, 7074, 7240, 7260, 7400, 7550, 7560, 7600, 7601, 7760, 10076, 10174, 10274, 10275, 10371, 10375, 10376, 10571, 10710, 10724, 10726, 10740
Offset: 1

Views

Author

Felix Fröhlich, Apr 05 2015

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {8, 9}] == 0, c[[7]] > 0, c[[10]] > 0]]; Select[Range@ 10800, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
  • PARI
    is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==7 && vecmax(digits(n^2))==7

A136809 Numbers k such that k and k^2 use only the digits 0, 1, 2 and 3.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11100, 11101, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101110, 110000, 110001, 110010, 110100, 110101, 111000, 111001, 111010
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with "DrScheme".
Subsequence of A136810-A136815. - M. F. Hasler, Jan 24 2008
From M. F. Hasler, Nov 03 2020: (Start)
A136813(144) = 31733311 is the first term of that sequence which is not in this sequence. All others among A136810-A136815 differ much earlier.
If a(n) is a term then so is 10*a(n). Conjecture: the sequence contains only "binary numbers" (digits 0 or 1) having no more than three 1's in a row, and not more than one run of two or more consecutive 1's. (But not all such numbers, since 101101 for example is not in the sequence.) (End)
Here is a counterexample with two instances of two consecutive ones, i.e., two non-overlapping occurrences of the substring 11: 110010000010100001010000010011^2 = 12102200102222202222322212223022221222322220222220100220121. - Michael S. Branicky, Nov 04 2020
One cannot test candidates digit-by-digit from the right. Specifically, a suffix of the valid counterexample above is invalid: 10100001010000010011^2 = 102010020402001222322220222220100220121. - Michael S. Branicky, Nov 05 2020
With respect to the conjectures and comment above, only digits 0 and 1 occur and no 1111's occur in the first 83990 terms (all with <= 25 digits). These were generated incrementally from the right based on partial screening (see Python program). - Michael S. Branicky, Jul 07 2022

Examples

			111^2 = 12321,
11101^2 = 123232201, and
101011^2 = 10203222121,
111001^2 = 12321222001, so 111, 11101, 101011 and 111001 are in the sequence, but:
110011^2 = 12102420121, so 110011 is not in the sequence; also
1100011^2 = 1210024200121, so 1100011 is not in the sequence, and
1010101^2 = 1020304030201, so 1010101 is not in the sequence; but
1110001^2 = 1232102220001, so 1110001 is in the sequence; also
1010100100001^2 = 1020302212022030200200001.
		

Crossrefs

Cf. A007088 (binary numbers), A136808 (subsequence: only 0, 1, 2), A136810, A136811, A136812, A136813, A136814, A136815.

Programs

  • Mathematica
    Select[Range[0,200000],And@@(ContainsAll[{0,1,2,3},Union@IntegerDigits@#]&/@{#,#^2})&] (* Giorgos Kalogeropoulos, May 21 2021 *)
    With[{c={0,1,2,3}},Select[FromDigits/@Tuples[c,6],SubsetQ[c,IntegerDigits[ #^2]]&]] (* Harvey P. Dale, Jun 01 2021 *)
  • PARI
    select( {is_A136809(n,o(n)=vecmax(digits(n))<4)=o(n^2)&&o(n)}, [fromdigits(binary(n))|n<-[0..99]]) \\ M. F. Hasler, Nov 03 2020
    
  • Python
    from itertools import count, islice
    def agen(only="0123"):
        digset, valid = set(only), set(only)
        for e in count(1):
            found, newvalid = set(), set()
            for tstr in valid:
                t = int(tstr)
                if (tstr == "0" or tstr[0] != "0") and set(str(t**2)) <= digset:
                    found.add(t)
                for d in digset:
                    dtstr = d + tstr
                    dt = int(dtstr)
                    remstr = str(dt**2)[-e:]
                    if set(remstr) <= digset:
                        newvalid.add(dtstr)
            valid = newvalid
            yield from sorted(found)
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 07 2022

A136985 Numbers k such that k and k^2 use only the digits 1, 2, 3 and 9.

Original entry on oeis.org

1, 3, 11, 111, 139
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
No additional terms < 10^11. - Harvey P. Dale, Oct 21 2019
From David A. Corneth, Oct 21 2019: (Start)
No additional terms < 10^31.
The final digits of 1^2, 2^2, 3^2 and 9^2 are 1, 4, 9 and 1 respectively, of which only 1 and 9 are allowed. So a term must end in 1, 3 or 9.
Checking two digits, we see that only numbers ending in 11, 23, 39 or 99 squared have the last two digits allowed.
Similar for three digits, a term must end in one of 111, 911, 123, 323, 923, 139, 239, 339 or 999.
We can recursively see how a number must end and hence reduce the numbers that must be checked. For example, we only have to check 4204352 31-digit numbers to know there are no 31-digit terms.
(End)
No additional terms < 10^38. - Michael S. Branicky, Jul 05 2021

Examples

			139^2 = 19321.
		

Crossrefs

Programs

  • Mathematica
    With[{c={1,2,3,9}},Select[Flatten[Table[FromDigits/@Tuples[c,n],{n,3}]],SubsetQ[ c,IntegerDigits[#^2]]&]] (* Harvey P. Dale, Oct 21 2019 *)
  • PARI
    \\ See Corneth link. David A. Corneth, Oct 21 2019

A137144 Numbers k such that k and k^2 use only the digits 4, 6, 7 and 8.

Original entry on oeis.org

8, 88, 8874, 68474, 86478
Offset: 1

Views

Author

Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008

Keywords

Comments

Generated with DrScheme.
No further terms up to and including 1000000. - Harvey P. Dale, Dec 03 2010
No further terms <= 10^40. - Michael S. Branicky, Feb 12 2024
From Pontus von Brömssen, May 01 2024: (Start)
a(6) > 6*10^46 (if it exists).
If k = x*10^m is a term where 1 < x < 10 and k is not 88 or 8874, then 20/3 < x < 8.7674847468864688448864887688468686674647846475.
(End)

Examples

			86478^2 = 7478444484.
		

Crossrefs

Programs

  • Mathematica
    clearQ[n_]:=Module[{dc=DigitCount[n]},dc[[1]]==dc[[2]]==dc[[3]]==dc[[5]]==dc[[9]]==dc[[10]]==0]
    Select[Range[1000000],clearQ[#]&&clearQ[#^2]&] (* Harvey P. Dale, Dec 03 2010 *)
Showing 1-4 of 4 results.