OFFSET
1,1
COMMENTS
It would be nice to have a simple explicit formula for the n-th term.
An efficient procedure for generating the n-th term of this sequence can be found at A178475. - Nathaniel Johnston, May 19 2011
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
MATHEMATICA
Take[FromDigits/@Permutations[Range[8]], 40] (* Harvey P. Dale, Oct 29 2014 *)
PROG
(PARI) is_A178478(x)= { vecsort(Vec(Str(x)))==Vec("12345678") }
(PARI) A178478(n)={my(b=vector(7, k, 1+(n-1)%(k+1)!\k!), t=b[7], d=vector(7, i, i+(i>=t))); for(i=1, 6, t=10*t+d[b[7-i]]; d=vecextract(d, Str("^"b[7-i]))); t*10+d[1]} \\ - M. F. Hasler (following N. Johnston's comment), Jan 10 2012
CROSSREFS
KEYWORD
fini,nonn,easy,base
AUTHOR
M. F. Hasler, Oct 09 2010
STATUS
approved