Bill Allombert on Wed, 09 Jul 2014 11:25:45 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Permutation and Combination how to find rank?


On Wed, Jul 09, 2014 at 09:12:39AM +0530, chandra sekaran wrote:
> Thank you for your reply.
> 
> In 256^2  let us take 235,250 and 250,235, 0,250  (0-255 total  256 values)
> 
> 235,250 will occur on 235*256+ 250 = 60410
> 
> 250,235 will occur on 250*256 + 235 = 64235.
> 
> 0, 250 will occur on 0*256 + 250  = 250
> 
> I want to know any function available in PARI to tell by giving 64235 to
> get 250 and 255 and reverse. In same way for higher power also ( 256^3 -
> three combination and permutation, 256^4 - four combination and permutation
> and so on.)

Try digits:
? digits(64235,256)
%1 = [250,235]

Cheers,
Bill.