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.

A111066 Numbers with digits 1 and 2 and at least one of each.

Original entry on oeis.org

12, 21, 112, 121, 122, 211, 212, 221, 1112, 1121, 1122, 1211, 1212, 1221, 1222, 2111, 2112, 2121, 2122, 2211, 2212, 2221, 11112, 11121, 11122, 11211, 11212, 11221, 11222, 12111, 12112, 12121, 12122, 12211, 12212, 12221, 12222, 21111, 21112, 21121, 21122, 21211
Offset: 1

Views

Author

Alexandre Wajnberg & Youri Mora, Oct 08 2005

Keywords

Crossrefs

Equals A007931 minus A000042 and A002276. Supersequence of A214218.

Programs

  • Mathematica
    FromDigits /@ Select[ IntegerDigits[ Range[210], 3], Union[ # ] == {1, 2} &] (* Robert G. Wilson v, Oct 09 2005 *)
    Union[FromDigits/@Select[Flatten[Table[Tuples[{1,2},n],{n,2,5}],1], Union[#] == {1,2}&]] (* Harvey P. Dale, Sep 05 2013 *)
  • Python
    from itertools import count, islice
    def agen():
        for i in count(1):
            s = bin(i+1)[3:].replace('1', '2').replace('0', '1')
            if 0 < s.count('1') < len(s):
                yield int(s)
    print(list(islice(agen(), 42))) # Michael S. Branicky, Dec 21 2021

Extensions

More terms from Robert G. Wilson v, Oct 09 2005
Crossrefs from Charles R Greathouse IV, Aug 03 2010

A175975 Numbers k with the property that k^k has exactly two 1's.

Original entry on oeis.org

8, 12, 17, 22, 23, 27, 30
Offset: 1

Views

Author

Zak Seidov, Nov 02 2010

Keywords

Comments

Next term (if any) > 10000. Is the sequence finite?
Any subsequent terms are > 10^5. - Lucas A. Brown, Mar 20 2024
From David A. Corneth, Mar 20 2024: (Start)
Any subsequent terms are > 10^9.
One could assume the digits to be random and look at the last few digits of k^k until it is clear that the number of 1's exceeds two. That way there is no need to compute k^k entirely.
Powers of 10 have exactly one digit 1 and so cannot be terms.
For 401113652 we have the last 253 digits containing exactly two 1's while the last 254 digits contain three 1's, proving that 401113652 is not a term. It appears that it usually takes the last 20 digits to prove that a number is not a term (the mode value); the median appears to be 27 digits. (End)

Examples

			8^8 = 16777216,
12^12 = 8916100448256,
17^17 = 827240261886336764177,
22^22 = 341427877364219557396646723584,
23^23 = 20880467999847912034355032910567,
27^27 = 443426488243037769948249630619149892803,
30^30 = 205891132094649000000000000000000000000000000.
		

Crossrefs

Cf. A000312 (n^n), A043494.

Programs

  • Mathematica
    Select[Range[40],DigitCount[#^#,10,1]==2&] (* Harvey P. Dale, Dec 16 2013 *)
  • Python
    A175975_list = [n for n in range(1000) if str(n**n).count('1') == 2] # Chai Wah Wu, May 19 2020
Showing 1-2 of 2 results.