mcnole25's Mini Console Tools

A big tool made of small quirky tools!

I made a collection of 45 Javascript functions to generate lists of data & numbers. Your built in browser's console is used to show the outputs.
All these functions were developed & tested by me. Copy & paste any of them, then open the console to try it out.
If you spot an overlooked error or performance issue, please notify me on Github right away, as I aim to provide information as accurate as possible.
I may not respond to all issues reported, as I'm not active on Github much, but when I'm around, I'll ensure to review & fix any issue.

Prime Number Generator


The function takes an input, then generates a list of prime numbers by checking each number for factors.

Partition into K Parts Generator


The function splits up n in all possible ways, into k unordered positive integers.

Math Table Generator


The function generates an n x n addition/multiplication table ("+" or "*") pretty printed with special characters.

1/N Digit Searcher


The function takes a search query for the 1st input, then generates reciprocals up to the 2nd input.

Decimal Period Searcher


The function generates all possible integer reciprocals with a certain period length. Example: 0.09090909... is period 2.

Digit Error Generator


The function reads the input number, then generates all possible numbers with exactly 1 digit changed. Works up to 9007199254740991.

Power Digit Race Simulator


The function sets up a table with all 10 digits counted at 0, then counts up from n**1 to n**k. Which digit will win?

Expression Generator v1


The function calculates all possible unordered add-subtract-multiply combos, with a maximum of 2 numbers per product & 3 products per expression.

Irrational Fraction Approximator


The function finds the closest fractions to a constant with the denominator increasing. If a fraction's distance beats the record, it gets added to the list.

Binary 1's Count Searcher


The function converts decimal numbers to binary, then counts the number of 1's for the 1st input. Inspired by the idea of odious/evil numbers.

Combinations Generator


The function goes through all nCr combinations of a given input list, or all possible subsets if the 2nd input is -1.

Modular Permutation Generator


The function generates powers of the 2nd input, going from 1 to the 1st input, then checks if (mod n + 1) has every number up to n.

Year Fraction Generator


The function converts the length of the years: 1/1, 1/2, 1/3, 1/4, etc. precisely to the nearest 0.00001 seconds. Based on the Gregorian calendar.

Primes in Buckets Generator


The function generates all combinations of prime number "buckets", with each bucket having a maximum size. Good method for visualizing the FTA.

Dice Probability Generator


The function rolls all possible combinations of n d-sided dice, then adds/multiplies the results, then generates a probability distribution.

Custom Fibonacci Series Generator


The function creates a general Fibonacci sequence with a term limit, a last term factor, a number of last terms to add, & a final offset addition. Can generate Pell, Fibonacci order 3, Tribonacci, etc.

Factored Square Root Generator


The function takes square roots of positive integers, then simplifies & factors them out until surds are reached.

Gregorian Day Index Generator


The function starts on 15 Oct 1582, when the Gregorian calendar was first established, then counts up the days ever since. Can you find your date of birth?

1/3 Binary Search Generator


The function uses BigInt & string manipulation to start at 0.5, then repeatedly searches for the decimal 1/3 with infinite precision.

Hypothetical Election Simulator


The function sets up 3 fictional candidates: "Yellow", "Cyan" & "Magenta", then randomly votes for the candidates based on a seed value. Which colour will win?

Tally Marks Generator


The function visualizes tally marks from 0 to the given input. If you know how tally works, no further explanation is needed.

Views & Likes Table Generator


The function sets up a formula for views & likes, then counts them day by day, with newer content growing fast, then view retention decays over time.

Permutations Generator


The function simply generates all possible ways to rearrange n items. (I don't really know how this code works tbh)

Pythagorean Triples Generator


The function iteratively checks: does i**2 + j**2 equal a perfect square? If it does, the equation is added to the list.

Special Relativity Table Generator


The function takes the input value, then generates increments of 1/input * c up to light speed, with time dilation & double velocity. Only use if you understand special relativity.

Multiply/Add Combo Rearranger


The function exhaustively produces all permutations of addition & multiplication, with algebraic variables as substitutes for numbers.

Lucky Number Series Generator


The function sieves out a list of positive integers in a certain way, with "lucky" numbers meaning they survive all the eliminations.

2x2 Sudoku Generator


The function checks all possibilities & generates all possible 2x2 Sudoku solutions. Spoiler: There are 288 possibilities.

Impossible Square Sums Generator


The function iteratively checks if i**2 + j**2 can never equal a value, then produces a sequence up to the given input. Based on squares on lattices.

Rock Paper Scissors Generator


The function checks all unordered ways n people can play rock paper scissors, then generates all the rules for each situation. Hint: The top 2 most chosen groups match up.

Yellowstone Permutation Generator


The function simply generates the Yellowstone permutation. Only use if you know what this sequence means, otherwise it's just jumbled numbers.

Every Second Converter


The function goes through every second of every day in 24 hour standard time, then shows you how it can be read in several different ways.

Palindrome Years Generator


The function checks through all years from 1583-9999, then generates palindromic dates, with reversed years corresponding to a (DD/MM/YYYY) date.

Arithmetic Combinations Generator


The function asks: How many ways can n numbers be arithmetized? (+, -, *, /), then smartly sorts & declutters using the BODMAS convention & the commutative laws.

Filter By Factor Count Searcher


The function is self explanatory, it filters a list of positive integers by how many factors it has. Notice how the input 2 produces primes.

Average Digits Sorter


The function sorts a list of numbers by the average digit of each number. Example: 3.5 is the average digit of 6215.

Final Digits of 2**N Generator


The function generates a table of powers of 2 with the final digit(s) having a certain period length. Convenient for large exponent calculation.

Collatz Conjecture Generator


The function says if a number is odd, 3n + 1. If it's even, n/2. So far, we seem to always reach 1. But do we ALWAYS? This is a famous unsolved math puzzle.

Team Elimination Simulator


The function sets up t teams of m, then randomly eliminates a player based on a seed value until 1 player is left. Will your favorite number win?

Balanced Ternary Sum Generator


The function uses powers of 3 to generate a list of additions & subtractions corresponding to each integer. The input uses exponential space, so keep your values low.

Number Properties Lister


The function lists positive integers & notes many properties they have, like being prime, square, Fibonacci, centered square, Tribonacci (sum of 3 last terms), etc.

2 Team Combinations Generator


The function finds all possible ways to split 2n people into 2 teams with n people each. The order doesn't matter for the teams or numbers.

Expression Generator v2


The function calculates all possible 3 way add/multiply expressions that equal the given input. Also supports the order of operations.

Quadratic Equation Generator


The function uses all possible quadratic equations with integer roots, then uses the quadratic formula to calculate those roots.

Automatic Competition Decider


The function is inspired by competition/object shows. It factors the number & finds the best team count for the cast size. Prime numbers mean individual competition.