Random Special Integer Generator
Create reproducible random integers filtered by properties: even, odd, composite, perfect squares, powers of two, or multiples of a factor. Useful for testing number classification, filtering, and mathematical algorithms.
Also known as: special numbers · filtered integers · mathematical properties
seeded
Output
About this tool, tips & examples
What it does
The Random Special Integer Generator draws integers with a chosen mathematical property: even, odd, composite, perfect squares, powers of two, or multiples of any factor you set. Pick a range, optionally enforce uniqueness, and generate up to 1,000 values per run — seeded, so number-theory fixtures stay stable.
Common use cases
- Algorithm testing — inputs guaranteed to satisfy (or violate) a property: feed a primality test nothing but composites, a bit-trick function nothing but powers of two.
- Math education — worksheets on classification, divisibility, and square recognition with property-pure number sets.
- Boundary probing — multiples-of-N sets exercise modular logic, pagination math, and alignment code.
- Property-based test seeds — curated corpora for fuzzing numeric functions.
Settings
- Property — even, odd, composite, perfect square, power of two, or multiple of a chosen Factor.
- Min / Max — the sampling range.
- Unique — no repeats within a run.
- How many — 1 to 1,000 integers, exportable as text, CSV, or JSON.
- Seed — identical seed + settings = identical values.
Privacy note
Values are computed locally in your browser; nothing is uploaded. Seeded and reproducible — number theory, not security.
FAQ
Why generate property-filtered numbers instead of filtering myself? Density: perfect squares thin out fast (only 31 below 1,000), so rejection-sampling them yourself wastes effort. Direct generation gives you as many as you asked for.
What’s special about powers of two? They’re the boundary values of computing: bit masks, buffer sizes, alignment. Code that’s subtly wrong often breaks exactly at 2ⁿ or 2ⁿ±1 — generate both this set and neighbors for the classic off-by-one hunt.
Primes too? Primes have their own tool — the Random Prime Generator — since primality testing deserves dedicated controls.