Some basic permutations

Let f ( n ) f(n) equal the average over all permutations of the digits 1 1 to n n (inclusive) interpreted in base n + 1 n+1 . For example, for f ( 3 ) f(3) we have

( 123 ) 4 = ( 27 ) 10 (123)_4 = (27)_{10} ( 132 ) 4 = ( 30 ) 10 (132)_4 = (30)_{10} ( 213 ) 4 = ( 39 ) 10 (213)_4 = (39)_{10} ( 231 ) 4 = ( 45 ) 10 (231)_4 = (45)_{10} ( 312 ) 4 = ( 54 ) 10 (312)_4 = (54)_{10} ( 321 ) 4 = ( 57 ) 10 (321)_4 = (57)_{10}

for an average value of 42 42 (in base 10).

Find f ( 1 0 6 ) f(10^6) mod 1000037 1000037 .


The answer is 539863.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Leonardo Joau
Jun 9, 2016

How can I calculate the remaining part without using Wolfram Alpha?

Hint: try using the extended Euclidean algorithm.

D G - 5 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...