Skip to content

Linear Sieve any Multiplicative Function #31

@ongyiumark

Description

@ongyiumark

https://codeforces.com/blog/entry/54090

With minor changes to the linear prime sieve, there's actually a way to linearly sieve any multiplicative function (phi, mobius, divisor, etc).

You just need to define f(p^k) where f is the multiplicative function and p is a prime. This uniquely identifies a multiplicative function.

I propose we add this generalized linear sieve.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions