A073531 Number of n-digit positive integers with all digits distinct.
9, 81, 648, 4536, 27216, 136080, 544320, 1632960, 3265920, 3265920
Offset: 1
Examples
a(3) = 648 because there are 648 three-digit integers with distinct digits.
Links
- Eric Weisstein's World of Mathematics, Digit
Programs
-
GAP
List([1..10],n->9*Factorial(9)/(Factorial(10-n))); # Muniru A Asiru, Dec 11 2018
-
Magma
[9*Factorial(9)/Factorial(10-n): n in [1..10]]; // Vincenzo Librandi, Dec 13 2018
-
Maple
seq(9*factorial(9)/(factorial(10-n)),n=1..10); # Muniru A Asiru, Dec 11 2018
-
Mathematica
Table[9*9!/(10-n)!, {n, 10}]
-
PARI
apply( A073531(n)=if(n<11,9*9!\/(10-n)!), [1..13]) \\ or: 9*binomial(9,10-n)*(n-1)! without need for if(). - M. F. Hasler, Dec 10 2018
Formula
a(n) = 9*9!/(10-n)!.
Extensions
Keywords fini, full added by Jon E. Schoenfield, May 17 2021
Comments