Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Dec 03 2014 07:10:44
%S 12345678,12345687,12345768,12345786,12345867,12345876,12346578,
%T 12346587,12346758,12346785,12346857,12346875,12347568,12347586,
%U 12347658,12347685,12347856,12347865,12348567,12348576,12348657,12348675,12348756,12348765
%N Permutations of 12345678: Numbers having each of the decimal digits 1..8 exactly once, and no other digit.
%C It would be nice to have a simple explicit formula for the n-th term.
%C An efficient procedure for generating the n-th term of this sequence can be found at A178475. - _Nathaniel Johnston_, May 19 2011
%H Nathaniel Johnston, <a href="/A178478/b178478.txt">Table of n, a(n) for n = 1..10000</a>
%t Take[FromDigits/@Permutations[Range[8]],40] (* _Harvey P. Dale_, Oct 29 2014 *)
%o (PARI) is_A178478(x)= { vecsort(Vec(Str(x)))==Vec("12345678") }
%o (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
%Y Cf. A030298, A030299, A055089, A060117, A178475-A178477, A191820.
%K fini,nonn,easy,base
%O 1,1
%A _M. F. Hasler_, Oct 09 2010