Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A116983
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A116983 Position of n! in the lexicographically ordered permutations of digits of n!. +0
1
1, 1, 1, 1, 1, 4, 6, 11, 54, 150, 648, 5013, 9849, 19345, 1060707, 10939036, 4343045, 2498014850, 5271260976, 78029366100, 531495923280, 805809810981, 1936900666393, 28724010464057580, 29052364970866225, 75805259574286872, 7466893805506395652, 80374513001512054041 (list; graph; listen)
OFFSET

0,6

LINKS

V. Letsko, Table of n, a(n) for n=0.,100.

EXAMPLE

a(5)=4 because 5!=120 and {1,2,0} is at 5-th position of 6 permutations of {0,1,2}: {{0,1,2},{0,2,1},{1,0,2},{1,2,0},{2,0,1},{2,1,0}}.

a(14)=1060707 because 14!=87178291200 and {8,7,1,7,8,2,9,1,2,0,0} is at 1060707-th position of 1247400 permutations of {0,0,1,1,2,2,7,7,8,8,9}.

MAPLE

for y to 1000 do N:=y!:s:=floor(log10(N))+1:a:=array(1..10): for i to 10 do a[i]:=0:od: c:=array(1..s):for j to s do c[j]:=floor(N/10^(j-1))-10*floor(N/10^j):od: for i to s do k:=c[i]:a[k+1]:=a[k+1]+1:od: q:=1:p:=s!/(a[10]!*a[1]!*a[2]!*a[3]!*a[4]!*a[5]!*a[6]!*a[7]!*a[8]!*a[9]!): for j from s by -1 to 2 do p:=p/j; r:=c[j]; if r>0 then for t from 0 to r-1 do if a[t+1]>0 then q:=q+p*a[t+1]:fi:od:fi:p:=p*a[r+1]:a[r+1]:=a[r+1]-1:od:print(y, N, q):od: [from Anatoly Kazmerchuk June 6 2009

MATHEMATICA

Do[per=Permutations[Sort[tn=IntegerDigits[n! ]]]; Print[Position[per, tn]], {n, 0, 14}]

CROSSREFS

Sequence in context: A091280 A066155 A105308 this_sequence A078426 A114413 A152678

Adjacent sequences: A116980 A116981 A116982 this_sequence A116984 A116985 A116986

KEYWORD

nonn,base

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), Apr 01 2006

EXTENSIONS

More terms and Maple code added by Vladimir Letsko (val-etc(AT)yandex.ru), Jun 17 2009

"base" keyword added by Max Alekseyev (maxale(AT)gmail.com), Jul 03 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research