Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
26
Task/Tau-function/BCPL/tau-function.bcpl
Normal file
26
Task/Tau-function/BCPL/tau-function.bcpl
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
get "libhdr"
|
||||
|
||||
let tau(n) = valof
|
||||
$( let total = 1 and p = 3
|
||||
while (n & 1) = 0
|
||||
$( total := total + 1
|
||||
n := n >> 1
|
||||
$)
|
||||
while p*p <= n
|
||||
$( let count = 1
|
||||
while n rem p = 0
|
||||
$( count := count + 1
|
||||
n := n / p
|
||||
$)
|
||||
total := total * count
|
||||
p := p + 2
|
||||
$)
|
||||
if n>1 then total := total * 2
|
||||
resultis total
|
||||
$)
|
||||
|
||||
let start() be
|
||||
for n=1 to 100
|
||||
$( writed(tau(n), 3)
|
||||
if n rem 20 = 0 then wrch('*N')
|
||||
$)
|
||||
Loading…
Add table
Add a link
Reference in a new issue