Post Reply 
50G: COMB (x 9) & COMB (x 10) ok, but not COMB (x 11)
10-13-2024, 01:19 PM (This post was last modified: 10-13-2024 01:59 PM by Gil.)
Post: #1
50G: COMB (x 9) & COMB (x 10) ok, but not COMB (x 11)
With the following program
« X SWAP COMB EXPAN
» that calculates COMB (X, i),

for i=9, I get:
'(X^9-36*X^8+546*X^7-4536*X^6+22449*X^5-67284*X^4+118124*X^3-109584*X^2+40320*X)/362880',

and for i=10, I get:
'(X^10-45*X^9+870*X^8-9450*X^7+63273*X^6-269325*X^5+723680*X^4-1172700*X^3+1026576*X^2-362880*X)/3628800'.

But, for i=11, I get a non simplified expression with still the factorials (!):
'X!/(39916800*(X-11)!)'.

Is there simple way to get — starting from 'X!/(39916800*(X-11)!)' a polynomial like the one for COMB(X, 10)?

What I wished is to avoid to write a program like:
« DUP 2 <
IF
THEN DROP 1
ELSE DUP x 1 ROT 1 -
FOR i x i - *
NEXT SWAP ! /
END EXPAN —>STR "+-" "-" SREPL DROP OBJ—>
»
Thanks in advance for your help.

Gil
Find all posts by this user
Quote this message in a reply
10-13-2024, 03:41 PM
Post: #2
RE: 50G: COMB (x 9) & COMB (x 10) ok, but not COMB (x 11)
COMB(x,11) = COMB(x,10) * (x-10)/11
Find all posts by this user
Quote this message in a reply
10-13-2024, 04:12 PM
Post: #3
RE: 50G: COMB (x 9) & COMB (x 10) ok, but not COMB (x 11)
It's indeed a nice way to get rid of the remaining x!
Find all posts by this user
Quote this message in a reply
10-13-2024, 06:10 PM (This post was last modified: 10-13-2024 06:11 PM by Gil.)
Post: #4
RE: 50G: COMB (x 9) & COMB (x 10) ok, but not COMB (x 11)
My basic idea was more what kind of built-in cammands like EXPAN (that does not work) are available on the HP50G to get directly (without a program) the polynomial form in x for, say, COMB (X, 20), ie

'1/2432902008176640000*x^20-1/12804747411456000*x^19+59/8536498274304000*x^18-19/50214695731200*x^17+18017/1255367393280000*x^16-10051/25107347865600*x^15+6406481/753220435968000*x^14-815081/5794003353600*x^13+354467473/193133445120000*x^12-33399473/1755758592000*x^11+6063698587/38626689024000*x^10-3975325483/3862668902400*x^9+5013017410969/941525544960000*x^8-2022480780283/94152554496000*x^7+694142313941/10461394944000*x^6-31938836201/209227898880*x^5+32262100943/128648520000*x^4-169704792667/617512896000*x^3+275295799/1551950400*x^2-1/20*x'

OR why, on the HP50G, does COMB (X, 10) EXPAN gives the expected polynomial but not COMB (X, 11) EXPAN ?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)