10-01-2017, 05:46 AM
For last natural number input N to the Home screen the programme returns the Nth element of the series
https://oeis.org/A027423
https://oeis.org/A027423
Code:
IF Ans<2
THEN
1:
ELSE
Ans►N:
1►M:
2►P:
DO
0►S:
P►Q:
DO
IQUOT(N,Q)►T:
T+S►S:
P*Q►Q:
UNTIL
NOT T
END:
NEXTPRIME(P)►P:
(S+1)*M►M:
UNTIL
N<P
END:
END: