10-04-2017, 01:56 PM
The prograqmme A110743 takes natural number input N from Ans & returns the Nth member of the sequence
https://oeis.org/A110743
The programme uses two sub-programmes, REVN reverses the digits of input & is available here
http://www.hpmuseum.org/forum/thread-9223.html
& PRIM tests its argument for primality & can be found here
http://www.hpmuseum.org/forum/thread-655...light=39gs
https://oeis.org/A110743
The programme uses two sub-programmes, REVN reverses the digits of input & is available here
http://www.hpmuseum.org/forum/thread-9223.html
& PRIM tests its argument for primality & can be found here
http://www.hpmuseum.org/forum/thread-655...light=39gs
Code:
RUN REVN:
Ans►O:
RUN PRIM:
IF Ans
THEN
O:
ELSE
FOR D=1 TO 6;
O*10►O:
FOR R=1 TO 10^D-1 STEP 2;
O+R►S:
RUN PRIM:
IF Ans
THEN
10^D►R:
6►D:
ELSE
IF R MOD 5==3
THEN
R+2►R:
END:
END:
NEXT:
NEXT:
S:
END: