|
Search: id:A069515
|
|
|
| A069515 |
|
Number of transpositions (interchanges of adjacent digits, sometimes called inversions) needed to change all n-digit base 3 numbers into nondecreasing order. |
|
+0 1
|
|
| 0, 3, 24, 135, 648, 2835, 11664, 45927, 174960, 649539, 2361960, 8444007, 29760696, 103630995, 357128352, 1219657095, 4132485216, 13904090883, 46490458680, 154580775111, 511395045480, 1684116865683, 5523066491184
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
The corresponding problem for base 2 numbers gives a(n)=A001793(n-1) for n=2,3,4,....
|
|
FORMULA
|
a(n)=3a(n-1)+(2n-1)3^(n-2).
a(n) = (n-1)(n+1)3^(n-2). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Sep 02 2003
|
|
EXAMPLE
|
The base 3 number 1210 requires 4 transpositions: 1210->1201->1021->0121->0112.
|
|
CROSSREFS
|
Cf. A064017.
Sequence in context: A009134 A009137 A001089 this_sequence A056350 A056344 A125651
Adjacent sequences: A069512 A069513 A069514 this_sequence A069516 A069517 A069518
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
John W. Layman (layman(AT)math.vt.edu), Apr 16 2002
|
|
EXTENSIONS
|
Corrected by T. D. Noe (noe(AT)sspectra.com), Nov 01 2006
|
|
|
Search completed in 0.002 seconds
|