Möbius function: Difference between revisions
Content deleted Content added
Line 142: | Line 142: | ||
cálculo de Mobius (n) |
cálculo de Mobius (n) |
||
si( #(n==1) ) |
si( #(n==1) ); tomar '" 1"' |
||
⚫ | |||
tomar '" 1"' |
|||
⚫ | |||
⚫ | |||
p=0 |
|||
⚫ | |||
si ( #( iszero(n%i) && isprime(i)) ) |
si ( #( iszero(n%i) && isprime(i)) ) |
||
cuando ( #( iszero(n%(i*i)) ) ){ |
|||
tomar '" 0"'; ir a (herejía) /* ¡! */ |
|||
} ++p |
|||
} ++p |
|||
fin si |
fin si |
||
siguiente |
siguiente |
||
tomar si ( es impar(p), " -1", " 1" ) |
tomar si ( es impar(p), " -1", " 1" ) |
||
fin si |
fin si |
||
/* ¡Dios! ¡Purifica esta mierda! ----+ */ |
/* ¡Dios! ¡Purifica esta mierda! ----+ */ |
||
/* | */ |
|||
herejía: /* <----------------------+ */ |
|||
retornar |
retornar |
||
</syntaxhighlight> |
</syntaxhighlight> |