OFFSET

1,2

COMMENTS

Main diagonal M[n,n,n] of M[i,j,k] = k-th natural number such that number of i's in base 10 is j, for i,j,k = 1,2,3,4,5,....

M[1,1,n] = A043493 Numbers that contain a single 1.

M[2,2,n] = A043498 Numbers n such that number of 2's in base 10 is 2.

M[3,3,n] = A043503 Numbers n such that number of 3's in base 10 is 3.

M[4,4,n] = A043508 Numbers n such that number of 4's in base 10 is 4.

EXAMPLE

First element is 1, the 1st natural number with exactly one 1 in base 10.

Second element is 122, the 2nd natural number with exactly two 2's in base 10.

Third element is 2333, the 3rd natural number with exactly three 3's in base 10.

PROG

(PARI) a(n)=my(v=List(), k=10^#Str(n), d=List(digits((k^n-1)/(k-1)*n)), t); for(i=1, #d+1, t=d; listinsert(t, 0, i); t=Vec(t); for(j=0, 9, t[i]=j; listput(v, fromdigits(t)))); Set(v)[n] \\ Charles R Greathouse IV, Jun 29 2015

CROSSREFS

KEYWORD

nonn,base,easy

AUTHOR

Jonathan Vos Post, Jun 29 2015

EXTENSIONS

a(5)-a(14) from Charles R Greathouse IV, Jun 29 2015

STATUS

approved