login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A186774
Smallest power of n whose decimal expansion contains n+1, or 0 if no such number exists.
2
32, 243, 256, 625, 7776, 16807, 4096, 31381059609, 0, 121, 79496847203390844133441536, 51185893014090757, 155568095557812224, 22168378200531005859375, 17592186044416, 118587876497, 11019960576, 42052983462257059
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
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
KEYWORD
nonn,base,easy
AUTHOR
Jonathan Vos Post, Feb 26 2011
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 03:45 EDT 2024. Contains 376185 sequences. (Running on oeis4.)