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!)
A186774 Smallest power of n whose decimal expansion contains n+1, or 0 if no such number. 2
32, 243, 256, 625, 7776, 16807, 4096, 31381059609, 0, 121, 79496847203390844133441536, 51185893014090757, 155568095557812224, 22168378200531005859375, 17592186044416, 118587876497, 11019960576, 42052983462257059 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

More precisely: smallest power of n (with positive integer exponent) whose decimal expansion contains n+1 as a substring of consecutive decimal digits. This is A[n,n+1], the diagonal above the trivial main diagonal of the array A[k,n] = Smallest power of k whose decimal expansion contains n.

The k=2 row A[2,n] = A030001.

The k=3 row A[3,n] = A176763.

The k=4 row A[4,n] = A176764.

The k=5 row A[5,n] = A176765...

a(10^k+1) = (10^k+1)^2 for k > 0. - Chai Wah Wu, Feb 13 2017

LINKS

Chai Wah Wu, Table of n, a(n) for n = 2..1999

EXAMPLE

a(2) = 32 = A030001(3) = smallest power of 2 whose decimal expansion contains 3.

a(3) = 243 = A176763(4) = smallest power of 3 whose decimal expansion contains 4.

MAPLE

a:= proc(n) local t, k;

      if type(simplify(log[10](n)), integer) then 0

    else t:= cat(n+1);

         for k from 2 while searchtext(t, cat(n^k))=0

         do od; n^k

      fi

    end:

seq(a(n), n=2..40);  # Alois P. Heinz, Feb 26 2011

PROG

(Python)

def A186774(n):

    if sum(int(d) for d in str(n)) == 1:

        return 0

    sn, k = str(n+1), 1

    while sn not in str(k):

        k *= n

    return k # Chai Wah Wu, Feb 13 2017

CROSSREFS

Cf. A018856, A063565, A030001, A176763-A176773.

Sequence in context: A070332 A111442 A104782 * A223952 A224136 A250363

Adjacent sequences:  A186771 A186772 A186773 * A186775 A186776 A186777

KEYWORD

nonn,base,easy

AUTHOR

Jonathan Vos Post, Feb 26 2011

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 September 19 18:36 EDT 2021. Contains 347564 sequences. (Running on oeis4.)