HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits
08-29-2017, 04:29 PM
Post: #11
 Gerald H Senior Member Posts: 1,627 Joined: May 2014
RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits
(08-29-2017 04:02 PM)Didier Lachieze Wrote:  My RPL is a bit rusty, so instead here is an HP Prime program:

Code:
EXPORT IntOdd(N)   BEGIN       10*IFTE(N<=5,0,IntOdd(IP((N-1)/5)))+2*((N-1) MOD 5)+1; END;

IntOdd(50) returns 179 in 0.5ms on my Prime.

Very nice, Didier.

Ihave translated the programme to the 49G thus:

Code:
INTODD « → N   « N 5 ≤     IF     THEN 0     ELSE N 1 - 5 IQUOT INTODD     END 10 * 1 + N 1 - 5 MOD 2 * +   » »

which I trust meets with your approval.

Time on 49G for input 50 is 0.81s & all answers have so far been correct.

At the moment you lead the field. Bravo!
 « Next Oldest | Next Newest »

 Messages In This Thread HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-28-2017, 02:21 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-28-2017, 04:21 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Claudio L. - 08-28-2017, 10:07 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-29-2017, 05:44 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-29-2017, 07:36 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Tugdual - 08-29-2017, 08:06 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-29-2017, 10:48 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-29-2017, 09:23 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - John Keith - 08-29-2017, 01:07 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-29-2017, 07:08 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Didier Lachieze - 08-29-2017, 04:02 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-29-2017 04:29 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gilles59 - 08-29-2017, 09:14 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Joe Horn - 08-30-2017, 01:19 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Brad Barton - 08-31-2017, 12:49 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Didier Lachieze - 09-01-2017, 07:48 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 09-01-2017, 08:11 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Brad Barton - 09-01-2017, 02:55 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Didier Lachieze - 09-02-2017, 06:51 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-29-2017, 05:55 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Claudio L. - 08-29-2017, 08:28 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Claudio L. - 08-29-2017, 09:56 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-30-2017, 09:06 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Didier Lachieze - 08-30-2017, 10:53 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-30-2017, 10:59 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Werner - 08-30-2017, 12:20 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-30-2017, 01:02 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Claudio L. - 08-30-2017, 02:08 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-31-2017, 10:57 AM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Claudio L. - 08-30-2017, 01:39 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Werner - 08-30-2017, 02:06 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Gerald H - 08-30-2017, 03:30 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - pier4r - 08-31-2017, 09:32 PM RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - David Hayden - 09-01-2017, 09:12 PM

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