RosettaCodeData/Task/Totient-function/APL/totient-function.apl

8 lines
221 B
APL
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
task{
totient 1+.=
prime totient=-1
'Index' 'Totient' 'Prime',(totient¨,[÷2]prime¨)25
{'There are' (+/prime¨) 'primes below' }¨100 1000 10000
}