Enumerating the number of n-digit numbers with at most k repetitions.

In this small account we consider the following combinatorial problem:

Enumerate all different n-digit numbers without leading zero and having no digit to re-appear more than k times?

Example: n = 2, k = 2:

(1, 0), (1, 1), (1, 2), … ,(1, 9), (2, 0), (2, 1), (2, 2) … , … (9, 9)

--

--

--

I am a mathematician and software developer who likes writing advanced code and to do research in applied and pure mathematics.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Clean Code React Project

[Vue] Setup Facebook Login in Nuxt + Firebase in 8 Step

BUILDING A MVC APPLICATION WITH NEXTJS AND PRISMA

Setting Up Django App

Announcing 💅 styled-components v2: A smaller, faster drop-in upgrade with even more features

Template literal types in the Vuex

Wreck the Web with Observables: How to make an Autocomplete Search with RxJS

How Javascript asynchronous functions and event loop work in Web Browser?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
applied.math.coding

applied.math.coding

I am a mathematician and software developer who likes writing advanced code and to do research in applied and pure mathematics.

More from Medium

Enumerating all p-tuples of positive integer lower or equal than k that sum up to n.

Generic Interface for Baremetal Task Management in Rust

Max Subset Sum | Rust

Rust programing for beginners [part two]