HP Forums

Full Version: (40G) OEIS A027423: Number of Divisors of N!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For last natural number input N to the Home screen the programme returns the Nth element of the series

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:
Improved programme:

Code:
IF Ans<2
 THEN
 1:
 ELSE
 Ans►N:
 1►M:
 2►P:
 DO
 0►S:
 N►T:
 DO 
 IQUOT(T,P)►T:
 T+S►S:
 UNTIL
 NOT T
 END:
 NEXTPRIME(P)►P:
 (S+1)*M►M:
 UNTIL
 N<P
 END:
 END:
Reference URL's