HP Forums
(33s): OEIS A262389: Integers with Last Digit Composite (Didier's Formula) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (33s): OEIS A262389: Integers with Last Digit Composite (Didier's Formula) (/thread-18599.html)



(33s): OEIS A262389: Integers with Last Digit Composite (Didier's Formula) - Gerald H - 07-29-2022 11:44 AM

The programme here is a translation of Didier's formula found in

https://www.hpmuseum.org/forum/thread-9008.html?highlight=A262389

The second programme, programme B, takes the output of A & returns the input of A.


Takes a real integer from the stack & returns A262389(N) to stack.
Nth member of integers with last digit composite.

Code:
1.    LBL A
2.    STO N
3.    CLx
4.    RMDR(N:4)
5.    STO R
6.    CLx
7.    10*IDIV(N-1:4)+2*R+7*ABS(SGN(R)-1)+2
8.    RTN

A: LN = 69

Inverse of A.

Code:
1.    LBL B
2.    STO N
3.    CLx
4.    RMDR(N:10)
5.    STO R
6.    CLx
7.    (N-R)/2.5
8.    STO B
9.    CLx
10.    B+IP(R/2+0.5)-1
11.    RTN

B: LN = 67