login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309007 Largest k such that n^k has distinct digits in base 10 (for n>1). 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

LINKS

Table of n, a(n) for n=2..87.

FORMULA

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

EXAMPLE

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

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 *)

PROG

(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)

(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

CROSSREFS

Cf. A010784.

For n=2, see A084688 and A260814.

Sequence in context: A040818 A216709 A040817 * A070714 A040816 A336061

Adjacent sequences:  A309004 A309005 A309006 * A309008 A309009 A309010

KEYWORD

nonn,base

AUTHOR

Tom Bryan, Jul 05 2019

EXTENSIONS

More terms from Rémy Sigrist, Jul 06 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 26 06:55 EDT 2021. Contains 348257 sequences. (Running on oeis4.)