All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Binomial Pandigital(s) (Posted on 2009-04-28)
Determine all possible pair(s) (M, X) of positive integers, with M - 1 > X > 1, such that the decimal representation of MCX consists of non leading zeroes and contains each of the digits 0 to 9 exactly once.

Note: MCX is the number of X-element subsets (the X-combinations) of an M-element set, that is the number of ways that X things can be 'chosen' from a set of M things.

 See The Solution Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution in basic | Comment 2 of 3 |

The program will capture only the lower value of X for C(M,X) and C(M,M-X), as it will abandon a given M when the X's cause the combinations to go above a 10-digit number.

UBASIC will not calculate by itself C(M,X) when M > 65536, so this is done via the formula for X = 2. Further values of X are not required as C(65535,3) is already 46,908,201,271,295, a 14-digit number.

As C(141422,2) already exceeds 10 digits, we need go no farther with M.

Thus the results will be complete.

`   10   Lm=141422   20   for M=4 to Lm   30     for X=2 to M-2   35        if M>=65536 and X>2 then cancel for:goto *NotThis   40        if M<65536 then C=combi(M,X):else C=int(M*(M-1)/2)   50        if C>9999999999 then cancel for:goto *NotThis   60        Cs=cutspc(str(C))   65        Good=0   70        if len(Cs)=10 then   75        :Good=1   80        :for I=1 to 9   90         :if instr(I+1,Cs,mid(Cs,I,1))>0 then Good=0:endif  100        :next  110        if Good then print M;tab(12);X;tab(18);C:inc SCt  120     next X  125   *NotThis  130   next M  140   print SCt  `

There are 84 results; you could double this by setting X = M - X in each instance:

`   M          X       C(M,X)253         5     8301429675595         4     516973842046098       2     106248975349797       2     123984570650140       2     125698473055152       2     152084397655485       2     153926487056521       2     159728346058051       2     168493027562496       2     195284376062568       2     195734602862901       2     197823645066295       2     219748036568806       2     236709841569543       2     241807965370767       2     250394876172595       2     263498071573738       2     271860945373972       2     273589140674169       2     275048319674358       2     276451890375556       2     285431679076365       2     291576843077806       2     302684791578687       2     309578264178849       2     310854297684556       2     357481629085960       2     369451782086077       2     370458192687264       2     380745921687670       2     384297061588407       2     390785462189884       2     403952178690288       2     407591632890298       2     407681925390981       2     413872569091477       2     418397502691836       2     421687953093393       2     436107952893627       2     438296075195112       2     452309871696994       2     470386952197488       2     475190632897965       2     479852163098685       2     486931527098758       2     487652190399271       2     492731608599325       2     493267815099613       2     4961325078100387      2     5038724691100747      2     5074928631101224      2     5123098476101709      2     5172309486104113      2     5419706328104202      2     5428976301104779      2     5489267031107154      2     5740936281107605      2     5789364210107829      2     5813492706109405      2     5984672310110395      2     6093472815112708      2     6351490278114039      2     6502389741117081      2     6853921740117423      2     6894021753118071      2     6970321485120699      2     7284063951121815      2     7419386205122221      2     7468925310122329      2     7482130956125064      2     7820439516125236      2     7841965230126162      2     7958362041128341      2     8235641970130689      2     8539742016131382      2     8630549271133615      2     8926417305133839      2     8956372041133876      2     8961324750134442      2     9037258461135658      2     9201478653138394      2     9576380421138816      2     9634871520138960      2     9654871320`

 Posted by Charlie on 2009-04-28 12:28:47
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2021 by Animus Pactum Consulting. All rights reserved. Privacy Information