Post Reply 
HHC 2016 RPN contest is now live
09-19-2016, 01:47 PM (This post was last modified: 09-19-2016 01:52 PM by Gerson W. Barbosa.)
Post: #14
RE: HHC 2016 RPN contest is now live
(09-19-2016 12:09 PM)Paul Dale Wrote:  \( \sum_{i=0}^{min(k, \lfloor{\frac{n}{10}}\rfloor)} (-1)^i \binom{k}{i} \binom{n+k-10i-1}{k-1} - \sum_{i=0}^{min(k-1, \lfloor{\frac{n}{10}}\rfloor)} (-1)^i \binom{k-1}{i} \binom{n+k-10i-2}{k-2} \)

The most difficult part is deriving a working formula. Congratulations and thanks! Give me a formula and I'll move the world:-)

If n < 10, then a 7-step would do the job:

Code:

001- LBL A
002-    +
003- DEC X
004- DEC X
005- RCL L
006- DEC X 
007- COMB
        END

Results start to be different when n > 9. I tabulated the first few differences for the case k = 6 and generalized the corresponding OEIS sequence for k, but this would work only for n up to 19. At this point I switched to the HP 50g for clarity:

Code:

« → k n
  « 'COMB(n+k-2,;k-1,)' EVAL n 9, >
    IF
    THEN 'COMB(n+k-12,;k-2,)*(k*(n-9,)-1,)/(k-1,)' -
    END
  »
»

No further improvement from here, though.

(09-19-2016 12:09 PM)Paul Dale Wrote:  My allergies have been dreadful for the last week and I'm not thinking even close to straight, so I could easily be completely wrong about all of this.

I woke up late on Sunday and remained in bed for the next eight or ten hours. Low blood sugar level, I think, six months after the latest episode. But I wouldn't have been able to find a solution anyway, as I can't think of anything even today, when it's gone.
Hope you are better now.

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2016 RPN contest is now live - Gene - 09-17-2016, 01:36 PM
RE: HHC 2016 RPN contest is now live - Gerson W. Barbosa - 09-19-2016 01:47 PM



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