Current section
Files
Jump to
Current section
Files
CHANGELOG
# Feature Release steps
- tests passing
- mix format
- inline documentation
- top of module documentation
- version bump in mix.exs
- version bump in README.md
- version bump in CHANGELOG
- version bump in library.md
- update OEIS stats for release version
- git tag -a v0.x.x -m "v0.x.x - summary"
- git push
- git push --tags
- mix hex.publish
# CHANGELOG
## v0.11.2
### Build/Development changes
- Module requiring HTTPoison and Jason excluded from packaging
- HTTPoison and Jason moved to `dev` and `test` only requirements
- Credo is now being used for style/consistency checks (with specific configuration to make credo run in a reasonable time frame)
- new documentation as main page for hexdocs (library.md)
### Libraries
- Refactored Fractions.lcm/1 and Fractions.lcm/2 to Math.lcm/1 and Math.lcm/2
- Refactored nth_root/3, integer_nth_root?/3, and floats_equal?/3 from Fractions to Math
- Updated all cached Math functions to use CacheAgent.cache_as macro
### Sequences
- Moved A000045/Fibonacci from Sequence.OEIS to Sequence.OEIS.Core
## v0.11.1
### Enhancements
- Chunky.Math
- `analyze_number/2` - Run all predicates against `n` to generate labels for `n`
- `is_odd?/1` - New predicate
- `is_even?/1` - New predicate
- `is_zero?/1` - New predicate
- `is_positive?/1` - New predicate
- `is_negative?/1` - New predicate
- all predicates of form `is_*?/1` now work for all integers in range `(-∞..+∞)
## v0.11.0
```
OEIS Coverage
210 total sequences
By Module
Elixir.Chunky.Sequence.OEIS - 3 sequences
Elixir.Chunky.Sequence.OEIS.Core - 88 sequences
Elixir.Chunky.Sequence.OEIS.Factors - 98 sequences
Elixir.Chunky.Sequence.OEIS.Primes - 1 sequences
Elixir.Chunky.Sequence.OEIS.Sigma - 20 sequences
Sequence Groups
OEIS Core Sequences - 89 / 177 (50.28%)
OEIS Core::Easy Sequences - 75 / 146 (51.37%)
OEIS Core::Hard Sequences - 12 / 12 (100.0%)
OEIS Core::Multiplicative Sequences - 22 / 22 (100.0%)
OEIS Core::Eigen Sequences - 5 / 5 (100.0%)
```
### Enhancements
- added Chunky.CacheAgent - caching agent for particularly recursive functions
- Chunky.Math
- ramanujan_tau/1 - Find the ramanujan tau error value for `n`
- partition_count/1 - Recursive (and cached) Partition Function for `n`
- abelian_group_count/1 - Number of Abelian groups of order `n`
- p_adic_valuation/2 - The _p-adic_ valuation function (for prime `p` and integer `n`)
- rooted_tree_count/1 - Rooted trees of N nodes
- is_of_form_mx_plus_b/3 - Does number have form `mx + b` for strict values of `m` and `b`?
- divisors_of_form_mx_plus_b/3 - Find divisors of `n` that are of form `mx + b`
- hurwitz_radon_number/1 - find the hurwitz-radon number of `n`
- catalan_number/1 - Find `C(n)`, the Catalan number, of `n`
- euler_zig_zag/1 - Permutation set sizes
- factorial/1 - Factorial `n!`
- binomial/2 - Binomial coefficient over `(n k)`
- wedderburn_etherington_number/1 - Count of permutations of binary rooted trees of size `n`
- functions for calculating positions in euler/pascal/element triangles
- eulerian_number/2
- euler_number
- combinatorics counting methods
- ...
### New Sequences
- OEIS Core
- A000001 - Number of groups of order n
- A000002 - Kolakoski sequence
- A000004 - The zero sequence
- A000007 - The characteristic function of {0}: a(n) = 0^n
- A000012 - The simplest sequence of positive numbers: the all 1's sequence
- A000027 - The positive integers
- A000032 - Lucas numbers beginning at 2
- A000035 - Period 2: repeat [0, 1]
- A000040 - The prime numbers.
- A000043 - Mersenne exponents: primes p such that 2^p - 1 is prime.
- A000069 - Odious numbers: numbers with an odd number of 1's in their binary expansion
- A000081 - Number of unlabeled rooted trees with n nodes
- A000085 - Number of self-inverse permutations on n letters, also known as involutions
- A000105 - Number of free polyominoes (or square animals) with n cells
- A000108 - Catalan numbers: C(n), Also called Segner numbers.
- A000109 - Number of simplicial polyhedra with n nodes
- A000110 - Bell or exponential numbers: number of ways to partition a set of n labeled elements
- A000111 - Euler or up/down numbers
- A000112 - Number of partially ordered sets ("posets") with n unlabeled elements
- A000120 - 1's-counting sequence: number of 1's in binary expansion of n (or the binary weight of n)
- A000124 - Central polygonal numbers (the Lazy Caterer's sequence)
- A000129 - Pell numbers: a(n) = 2*a(n-1) + a(n-2)
- A000142 - Factorial numbers: n! = 1*2*3*4*...*n
- A000166 - Subfactorial or rencontres numbers, or derangements of `n`
- A000169 - Number of labeled rooted trees with n nodes: n^(n-1)
- A000204 - Lucas numbers (beginning with 1)
- A000217 - Triangular numbers: a(n) = binomial(n+1,2)
- A000219 - Number of planar partitions (or plane partitions) of n
- A000225 - a(n) = 2^n - 1
- A000262 - Number of "sets of lists"
- A000272 - Number of trees on n labeled nodes
- A000292 - Tetrahedral (or triangular pyramidal) numbers
- A000312 - a(n) = n^n; number of labeled mappings from n points to themselves
- A000326 - Pentagonal numbers: a(n) = n*(3*n-1)/2.
- A000330 - Square pyramidal numbers
- A000364 - Euler (or secant or "Zig") numbers
- A000521 - Coefficients of modular function j as power series in q = e^(2 Pi i t)
- A000583 - Fourth powers: a(n) = n^4.
- A000594 - Ramanujan's tau function
- A000609 - Number of threshold functions of n or fewer variables
- A000670 - Fubini numbers
- A000688 - Number of Abelian groups of order n
- A000720 - pi(n), the number of primes <= n.
- A000796 - Decimal expansion of Pi
- A000798 - Number of different quasi-orders (or topologies, or transitive digraphs) with n labeled elements
- A001190 - Wedderburn-Etherington numbers: unlabeled binary rooted trees
- A001227 - Number of odd divisors of n.
- A001477 - The nonnegative integers.
- A001511 - The ruler function: 2^a(n) divides 2n
- A002106 - Number of transitive permutation groups of degree n
- A002654 - Number of ways of writing n as a sum of at most two nonzero squares, where order matters
- A003094 - Number of unlabeled connected planar simple graphs with n nodes
- A003484 - Radon function, also called Hurwitz-Radon numbers
- A005470 - Number of unlabeled planar simple graphs with n nodes
- A006966 - Number of lattices on n unlabeled nodes
- A008292 - Triangle of Eulerian numbers T(n,k)
- A055512 - Lattices with n labeled elements
- OEIS Factors
- A001826 - Number of divisors of n of form 4k+1
- A001842 - Expansion of Sum_{n>=0} x^(4*n+3)/(1 - x^(4*n+3))
## v0.10.0
```
OEIS Coverage
144 total sequences
By Module
Elixir.Chunky.Sequence.OEIS - 3 sequences
Elixir.Chunky.Sequence.OEIS.Core - 24 sequences
Elixir.Chunky.Sequence.OEIS.Factors - 96 sequences
Elixir.Chunky.Sequence.OEIS.Primes - 1 sequences
Elixir.Chunky.Sequence.OEIS.Sigma - 20 sequences
Sequence Groups
OEIS Core Sequences - 25 / 177 (14.12%)
```
### Enhancements
- Chunky.Math
- jordan_totient/2 - Jordan totient `J-k(n)`
- mobius_function/1 - Classical mobius function
- omega/1 - Count of distinct prime factors
- bigomega/1 - Count of distinct prime factors, with multiplicity
- greatest_prime_factor/1 - largest prime factor of `n`
- least_prime_factor/1 - smallest prime factor of `n`
- tau/1 - Tau function, number of divisors of `n`
- is_squarefree?/1 - Are any factors of `n` perfect squares?
- is_cubefree?/1 - Are any factors of `n` perfect cubes?
- radical/1 - Square-free kernel, or `rad(n)` - product of distict prime factors
- prime_factor_exponents/1 - Find the exponents of all prime factors of `n`
- is_power_of?/2 - Is `n` a power of `m`?
- is_sphenic_number?/1 - Is `n` the product of three distinct primes?
### New Sequences
- A007434 - Jordan-2 totient `J_2(n)`
- A059376 - Jordan function J_3(n)
- A059377 - Jordan function J_4(n)
- A059378 - Jordan function J_5(n)
- A065958 - a(n) = n^2*Product_{distinct primes p dividing n} (1+1/p^2)
- A065959 - a(n) = n^3*Product_{distinct primes p dividing n} (1+1/p^3)
- A065960 - a(n) = n^4*Product_{distinct primes p dividing n} (1+1/p^4)
- A069091 - Jordan function J_6(n)
- A069092 - Jordan function J_7(n)
- A069093 - Jordan function J_8(n)
- A069094 - Jordan function J_9(n)
- A069095 - Jordan function J_10(n)
- A160889 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 4
- A160891 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 5
- A160893 - a(n) = Sum_{d|n} Möbius(n/d)*d^5/phi(n)
- A160895 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 7
- A160897 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 8
- A160908 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 9
- A160953 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 10
- A160957 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 11
- A160960 - a(n) = Sum_{d|n} Moebius(n/d)*d^(b-1)/phi(n) for b = 12
- A001615 - Dedekind psi function
- A008683 - Möbius (or Moebius) function mu(n)
- A001221 - Number of distinct primes dividing n (also called omega(n))
- A001222 - Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n))
- A006530 - Gpf(n): greatest prime dividing n
- A020639 - Lpf(n): least prime dividing n
- A000244 - Powers of 3
- A000290 - The squares: a(n) = n^2
- A000302 - Powers of 4: a(n) = 4^n
- A000578 - The cubes: a(n) = n^3.
- A001358 - Semiprimes (or biprimes): products of two primes
- A005117 - Squarefree numbers: numbers that are not divisible by a square greater than 1
- A000037 - Numbers that are not squares
- A000977 - Numbers that are divisible by at least three different primes
- A004709 - Cubefree numbers: numbers that are not divisible by any cube > 1
- A006881 - Squarefree semiprimes: Numbers that are the product of two distinct primes
- A007018 - a(n) = a(n-1)^2 + a(n-1), a(0)=1
- A007304 - Sphenic numbers: products of 3 distinct primes
- A007412 - The noncubes: n + [ (n + [ n^{1/3} ])^{1/3} ]
- A007774 - Numbers that are divisible by exactly 2 different primes
- A007947 - Largest squarefree number dividing n
- A008966 - 1 if n is squarefree, else 0.
- A013929 - Numbers that are not squarefree.
- A014612 - Numbers that are the product of exactly three primes, including multiplicity.
- A014613 - Numbers that are products of 4 primes
- A014614 - Numbers that are products of 5 primes
- A030513 - Numbers with 4 divisors
- A030515 - Numbers with exactly 6 divisors
- A033273 - Number of nonprime divisors of n
- A033942 - At least 3 prime factors (counted with multiplicity).
- A033987 - Numbers that are divisible by at least 4 primes (counted with multiplicity)
- A033992 - Numbers that are divisible by exactly three different primes
- A033993 - Numbers that are divisible by exactly four different primes
- A036537 - Numbers whose number of divisors is a power of 2.
- A037143 - Numbers with at most 2 prime factors (counted with multiplicity).
- A038109 - Divisible exactly by the square of a prime.
- A039956 - Even squarefree numbers.
- A046099 - Numbers that are not cubefree. Numbers divisible by a cube greater than 1.
- A046306 - Numbers that are divisible by exactly 6 primes with multiplicity.
- A046308 - Numbers that are divisible by exactly 7 primes counting multiplicity.
- A046310 - Numbers that are divisible by exactly 8 primes counting multiplicity
- A046312 - Numbers that are divisible by exactly 9 primes with multiplicity
- A046314 - Numbers that are divisible by exactly 10 primes with multiplicity
- A046321 - Odd numbers divisible by exactly 8 primes (counted with multiplicity)
- A046386 - Products of four distinct primes
- A046387 - Products of 5 distinct primes
- A046660 - Excess of n = Ω(n) - ω(n)
- A048272 - Number of odd divisors of n minus number of even divisors of n
- A051270 - Numbers that are divisible by exactly 5 different primes
- A056911 - Odd squarefree numbers.
- A059269 - Numbers n for which tau(n) is divisible by 3.
- A067259 - Cubefree numbers which are not squarefree
- A067885 - Product of 6 distinct primes
- A069272 - 11-almost primes (generalization of semiprimes)
- A069273 - 12-almost primes (generalization of semiprimes)
- A069274 - 13-almost primes (generalization of semiprimes)
- A069275 - 14-almost primes (generalization of semiprimes)
- A069276 - 15-almost primes (generalization of semiprimes)
- A069277 - 16-almost primes (generalization of semiprimes)
- A069278 - 17-almost primes (generalization of semiprimes)
- A069279 - Products of exactly 18 primes (generalization of semiprimes)
- A069280 - 19-almost primes (generalization of semiprimes)
- A069281 - 20-almost primes (generalization of semiprimes)
- A074969 - Numbers with six distinct prime divisors
- A076479 - a(n) = mu(rad(n)), where mu is the Moebius-function
- A117805 - Start with 3. Square the previous term and subtract it.
- A123321 - Products of 7 distinct primes
- A123322 - Products of 8 distinct primes
- A130897 - Numbers that are not exponentially squarefree.
- A162643 - Numbers such that their number of divisors is not a power of 2.
- A209061 - Exponentially squarefree numbers
- A211337 - Numbers n for which the number of divisors, tau(n), is congruent to 1 modulo 3
- A211338 - Numbers n for which the number of divisors, tau(n), is congruent to 2 modulo 3
## v0.9.0
### Changes/Refactorizations
### Enhancements
- Chunky.Math
- is_abundant?/1 - Is a number `n` an Abundant number
- next_abundant/1 - Find the next abundant number after `n`
- is_perfect?/1 - Is a number `n` a perfect number
- is_deficient?/1 - Is a number `n` a deficient number
- next_deficient/1 - Find the next deficient number
- is_arithmetic_number?/1 - Is a number `n` an arithmetic number
- aliquot_sum/1 - Aliquot Sum of `n`
- is_highly_abundant?/1` - Is a number `n` highly abundant?
- is_powerful_number?/1 - Is a number `n` a powerful number?
- product_of_prime_factors/1 - Number theoretical function for product of prime factor exponents of `n`
- is_highly_powerful_number?/1 - Is a number a _highly powerful_ number?
- is_perfect_power?/1 - Is integer `n` a perfect power?
- is_perfect_square?/1 - Is integer `n` a perfect square?
- is_perfect_cube?/1 - Is integer `n` a perfect cube?
- is_root_of?/2 - Is integer `n` any k-th root of `m`?
- is_achilles_number?/1 - Is integer `n` an achilles number?
- is_coprime?/2 - Test if `m` and `n` are co-prime
- totient/1 - Calculate Euler's totient for `n`
- Chunky.Sequence
- drop/2 - Like Enum.drop
### New Sequences
- A001065 - Aliquot parts of N
- A005101 - Abundant Numbers
- A000396 - Perfect Numbers
- A005100 - Deficient Numbers
- A003601 - Arithmetic Numbers
- A002093 - Highly Abundant Numbers
- Added Sequences.OEIS.Factors module
- A001694 - Powerful Numbers
- A005361 - Product of Prime Exponents of factors of N
- A005934 - Highly powerful numbers: numbers with record value
- A001597 - Perfect Powers
- A052486 - Achilles Numbers
- A000010 - Euler's totient function
## v0.8.0
### Changes/Refactorizations
### Enhancements
- Chunky.Sequence
- sequences are now marked as finite or infinite (as computable/stored in Squence library)
- sequences can now have initial index/offset other than 0 (like A000593)
- New Functions:
- `is_finite?/1` - Is a sequence finite or infinite is sequence library?
- Chunky.Math
- `factors/1` - All divisors of N
- `sigma/1` - Sigma-1 function of factors of N
- `sigma/2` - Generalized Sigma function
- `pow/2` - Pure integer exponentiation
### New Sequences
- A000593 - Sum of Odd Divisors of N
- A000009 - Number of partitions of n into distinct parts
- A000079 - Powers of 2
- A000203 - Sigma-1 of N
- A001057 through A001060 - sigma2 through sigma5 of N
- A013954 through A013968 - sigma6 through sigma20 of N
## v0.7.0
### Enhancements
- `Chunky.Math` - Extended math for integers and floating point
- `pow/3` - Modular arithmetic exponentiation
- `is_prime?/1` - Primality test for integers
- `prime_factors/1` - Factorize an integer to prime factors
- `Chunky.Sequences` - Create, inspect, manipulate, iterate, and compare finite and infinite value sequences
- New functions:
- `create/3` - Create a new sequence instance
- `available/0` - List all loaded sequences from all loaded applications and modules
- `available/1` - List available sequences from a module
- `has_next?/1` - Check that a sequence has at least one more available value
- `is_available?/2` - Check if a specific sequence is available
- `is_instance/2` - Check if a sequence is an instance of a specific sequence identifier
- `is_instance/3` - Check if a sequence is an instance of a specific sequence identifier
- `get_references/1` - Retrieve reference sources and links for a sequence
- `has_reference?/2 - Check if a sequence has a specific reference source
- `readable_name/1` - Find the human readable name of a sequence
- `next/1` - Retrieve the next sequence value and updated sequence struct as a tuple
- `next!/1` - Retrieve the next sequence as just an updated sequence struct
- `take/2` - Like `Enum.take/2` - retrieve a list of values from a sequence
- `take!/2` - Like `take/2`, but only return the updated sequence struct
- `sequence_for_function/1` - Wrap a function as a sequence - see Developing New Sequences
- `sequence_for_list/1` - Wrap a list as a sequence - see Developing New Sequences
- `map/2` - Apply a function to values in a sequence, and collect the result
- New Sequences:
- `{Basic, :whole_numbers}` - Whole number sequence, starting from `1` or any other digit
- `{Basic, :empty}` - The empty sequence
- `{Basic, :decimal_digits}` - The decimal digits
- `{OEIS, :a000045}` - OEIS - Fibonacci sequence
- `{OEIS, :fibonacci}` - OEIS - alternate name, Fibonacci sequence
- `{OEIS, :keyword_core}` - OEIS - List of core sequences, according to OEIS
- `{OEIS, :a000041}` - OEIS - Partitions of Integers
- Various test sequences
## v0.6.5
### Enhancements
- `Chunky.Fractions`
- added `uniq/2` for finding distinct fractions in a list
- added `sort/2` for sorting value lists
- added `clamp/2` for constraining value lists
## v0.6.4
### Enhancements
- `Chunky.Fraction`
- Most functions now use type coercion to handle any value that can be converted to a fraction via `new/1`
## v0.6.3
### Enhancements
- `Chunky.Fraction`
- `to_float/2` - convert to a float, with optional precision rounding
- `min_of/1` - find the smallest from a list of fractions
- `min_of/2` - find the smallest of two fractions
- `Chunky.Grid`
- `put_all/2` - basic function for putting `{x, y, v}` tuples or `%{x: x, y: y, value: value}` maps into the grid
- `find_index/2` - Find coordinates in grid of a value
## v0.6.2
### Documentation
- `Chunky.Fraction` - Enhancements to documentation. Extended doctests
## v0.6.1
### Enhancements
- `Chunky.Grid`
- `put_at/3` and `put_at/4` - put values into the grid
## v0.6.0
### Enhancements
- `Chunky.Fraction` module for manipulating fractions
- `new/2` - create a new fraction
- `new/1` - create a new fraction from a tuple or integer
- `has_whole?/1` - fractions is greater than 1, and has a whole component
- `is_whole?/1` - does a fraction exactly represent a whole number
- `components/1` - tuple of numerator an denominator
- `get_whole/1` - get reduced whole component of a fraction
- `get_remainder/1` - get remainder of fraction after removing whole components
- `split/1` - combine `get_whole/1` and `get_remainder/1` into one call
- `is_simplified?/1` - is fraction in reduced form?
- `simplify/1` - reduce fraction
- `is_zero?/1` - does fraction represent zero?
- `add/3` - Add two fractions, or a fraction and an integer
- `subtract/3` - Subtract two fractions, or a fraction and an integer
- `String.Chars` - Fractions now work properly with IO functions
- `multiply/3` - Multiply two fractions, or a fraction and an integer
- `reciprocal/2` - Take the reciprocal of a fraction
- `divide/3` - Divide two fractions, or a fraction and an integer
- `normalize/2` - Normalize two fractions to a common denominator
- `is_positive?/1` - Test if a fraction is positive
- `is_negative?/2` - Test if a fraction is negative
- `power/3` - Fractional and integer powers of integers and fractions
- `gt?/2`, `gte?/2`, `lt?/2`, `lte?/2`, and `eq?/2` added for comparison between fractions and fractions and integers
- `normalize_all/1` - normalize a list of fractions and integers, like `normalize/2`
- `sum/2` - sum a list of fractions and integers
- `lcm/1` - find Least Common Multiple from a list of integers
- `Chunky.Grid` module for working with two dimensional data
- `Grid.new/3` - generate a grid from a value or a function
- `Grid.get_at/2` and `Grid.get_at/3` - access cell value by 2d index
- `Grid.valid_coordinate/*` and `Grid.valid_coordinate?/*` - determine if a coordinate is within grid bounds
## v0.5.0
### Enhancements
- `Chunky.combinations_size/2` - pre-calculate the size of a combination using a closed form equation, instead of running the combination
## v0.4.1
### Documentation
- Fixes for embedded `@moduledoc` for better Hexdocs layout
## v0.4.0
### Enhancements
- `Chunky.permutations_size/1` - pre-calculate the size of a permutation using a closed form equation, instead of running the permutation
## v0.3.0
### Enhancements
- Added `Chunky.combinations/2` for nCr unordered set generation
### Documentation
- move all TODO items out of Chunky module
- remove references to incomplete/unimplemented functions
## v0.2.1
### Documentation
- Fix reference to `Chunky.chunk_length/2` in moduledoc
## v0.2.0
### Enhancements
- `Chunky.chunk_length/2` added. Supports `list`, `tuple`, `binary`, and `range` types
### Documentation
- Cleanup of readme and top level documentation
- Hexdocs now have embedded readme data
## v0.1.1
### Documentation
- Expanded documentation for `Chunky.permutations/1`
## v0.1.0
### Enhancements
- `Chunky.permutations/1` added. Supports `list`, `tuple`, `binary`, and `range` types