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.

A084688 Nonnegative integers n such that 2^n uses only distinct decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 29
Offset: 1

Views

Author

Zak Seidov, Jul 01 2003

Keywords

Comments

There are exactly 18 numbers such that 2^n uses only distinct digits.
a(n) can have at most 10 digits. As 2^34 has 11 digits, a(n) < 34. - David A. Corneth, Aug 03 2015
Subsequence of A052060. - R. J. Mathar, Sep 17 2008

Examples

			29 is the last term with 2^29 = 536870912 = A260814(18). - _Zak Seidov_, Aug 02 2015
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 34], Max@ DigitCount[2^#] == 1 &] (* Michael De Vlieger, Aug 03 2015 *) (* with corrections by Zak Seidov, Aug 05 2015 *)
  • PARI
    lista() = {lim = ceil(log(10^11)/(log(2)));for (n=0, lim, d = digits(2^n); if (#vecsort(d,,8) == #d, print1(n, ", ")););} \\ Michel Marcus, Aug 03 2015

Formula

a(n) = log_2(A260814(n)). - Zak Seidov, Aug 02 2015

A309007 Largest k such that n^k has distinct digits in base 10 (for n>1).

Original entry on oeis.org

29, 9, 10, 8, 4, 8, 5, 3, 1, 0, 4, 4, 5, 1, 5, 6, 4, 3, 1, 3, 3, 4, 3, 4, 1, 3, 2, 3, 1, 2, 4, 2, 1, 3, 2, 2, 5, 1, 1, 3, 2, 2, 4, 1, 1, 1, 4, 4, 1, 2, 2, 2, 2, 2, 1, 2, 1, 3, 1, 2, 1, 1, 2, 1, 3, 1, 1, 3, 1, 2, 2, 3, 2, 3, 3, 0, 2, 2, 1, 1, 2, 1, 3, 1, 2, 2
Offset: 2

Views

Author

Tom Bryan, Jul 05 2019

Keywords

Examples

			For n = 2, 2^29 = 536870912, which is the largest power of 2 to contain distinct digits.
		

Crossrefs

Cf. A010784.
For n=2, see A084688 and A260814.

Programs

  • Mathematica
    a[n_] := SelectFirst[ Range[ Floor@ Log[n, 10^10], 0, -1], (Sort[#] == Union[#]) &@ IntegerDigits[ n^#] &]; Array[a, 86, 2] (* Giovanni Resta, Jul 07 2019 *)
  • PARI
    a(n) = forstep (k=logint(10^10, n), 0, -1, my (d=digits(n^k)); if (#d==#Set(d), return (k))) \\ Rémy Sigrist, Jul 06 2019
  • Python
    def distinct_digits(n):
        p = math.floor(math.log(10**10)/math.log(n))
        while p >= 1:
            d = n**p
            if len(set(str(d))) == len(str(d)):
                return(p)
            else:
                p = p - 1
        return(0)
    

Formula

a(n) = 0 for any n > 9876543210. - Rémy Sigrist, Jul 06 2019

Extensions

More terms from Rémy Sigrist, Jul 06 2019
Showing 1-2 of 2 results.