SmoothNumbers.jl

Algorithms to generate smooth numbers
Author FedericoStra
Popularity
1 Star
Updated Last
1 Year Ago
Started In
May 2023

SmoothNumbers.jl

Algorithms to generate smooth numbers

Stable Dev Build Status Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

See the definition of smooth number on Wikipedia and MathWorld.

Examples

Compute the first 10 3-smooth numbers, i.e. numbers of the form 2^i * 3^j:

julia> using SmoothNumbers

julia> smooth(3, 10)
10-element Vector{Int64}:
  1
  2
  3
  4
  6
  8
  9
 12
 16
 18

Compute the first 10 numbers of the form 2^3 * 3^i * 7^i:

julia> using SmoothNumbers

julia> with_bases([2, 3, 7], 10)
10-element Vector{Int64}:
  1
  2
  3
  4
  6
  7
  8
  9
 12
 14

Used By Packages

No packages found.