Skip to content

Instantly share code, notes, and snippets.

@diewland
Created July 14, 2022 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diewland/a2a16ccc1e963ab1ad782a501330e7c2 to your computer and use it in GitHub Desktop.
Save diewland/a2a16ccc1e963ab1ad782a501330e7c2 to your computer and use it in GitHub Desktop.
Calculate seed size
let count_seed = (word_size, seed_size) => {
if (seed_size == 1) return word_size;
return word_size * count_seed(word_size-1, seed_size-1);
}
console.log('seed size 12', '=>', count_seed(2048, 12).toLocaleString());
console.log('seed size 24', '=>', count_seed(2048, 24).toLocaleString());
// seed size 12 => 5,271,537,971,301,488,400,000,000,000,000,000,000,000
// seed size 24 => 25,892,008,055,647,378,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment