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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243151 Least number k not divisible by 10 such that the decimal expansion of k^n contains some digit exactly n times. 1

%I #6 Jun 01 2014 00:08:30

%S 1,11,36,34,99,258,391,163,341,951,867,1692,1114,793,4792,3019,1935,

%T 5469,6398,6152,8906,1987,15815,19603,16292,26216,32113,19718,24354,

%U 45903,15776,42202,34572,44411,46911,67972,39291,52299,30499,28383,38001,89782,95017,55954

%N Least number k not divisible by 10 such that the decimal expansion of k^n contains some digit exactly n times.

%C If k were divisible by 10, all of those numbers would work for any n and the sequence would be 1, 10, 10, 10, 10, 10, 10, 10, ....

%C Does a(n) exist for each n? - _Charles R Greathouse IV_, May 31 2014

%F a(n) > 10 for all n > 1. (Proof: check up to 21, then note that 9^22 < 10^21.) _Charles R Greathouse IV_, May 31 2014

%e 1^2, 2^2, 3^2, 4^2, ... 9^2 all have different digits. 11^2 = 121 has two of the same digit. So a(2) = 11.

%o (Python)

%o def c(n):

%o ..for k in range(10**5):

%o ....if k%10 !=0:

%o ......count = 0

%o ......for i in range(10):

%o ........if str(k**n).count(str(i)) == n:

%o ..........return k

%o n = 1

%o while n < 100:

%o ..print(c(n))

%o ..n+=1

%o (PARI) digitct(n)=my(d=digits(n)); vector(10,i,sum(j=1,#d,d[j]==i-1))

%o a(n)=if(n==1,return(1)); my(k=9); until(k++%10 && #select(i->i==n, digitct(k^n)), ); k \\ _Charles R Greathouse IV_, May 31 2014

%K nonn,base

%O 1,2

%A _Derek Orr_, May 31 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 25 09:56 EDT 2024. Contains 371967 sequences. (Running on oeis4.)