Post Reply 
HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits
08-29-2017, 04:02 PM
Post: #10
RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 49G Programming Challenge: OEIS A014261, Integers with exclusively Odd Digits - Didier Lachieze - 08-29-2017 04:02 PM



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