title: Frugal number
text: # Frugal number
  
  In number theory, a frugal number is a natural number in a given number base that has more digits than the number of digits in its prime factorization in the given number base (including exponents). For example, in base 10, 125 = $5^3,$ 128 = $2^7,$ 243 = $3^5,$ and 256 = $2^8$ are frugal numbers (sequence A046759 in the OEIS). The first frugal number which is not a prime power is 1029 = 3 × $7^3.$ In base 2, thirty-two is a frugal number, since 32 = $2^5$ is written in base 2 as 100000 = $10^{101}.$
  
  The term economical number has been used for a frugal number, but also for a number which is either frugal or equidigital.
  
  ## Mathematical definition
  
  Let $b>1$ be a number base, and let $K_{b}(n)=\lfloor \log _{b}{n}\rfloor +1$ be the number of digits in a natural number $n$ for base $b$. A natural number $n$ has the prime factorisation
  
      $n=\prod _{\stackrel {p\,\mid \,n}{p{\text{ prime}}}}p^{v_{p}(n)}$
  
  where $v_{p}(n)$ is the p-adic valuation of $n$, and $n$ is an frugal number in base $b$ if
  
      $K_{b}(n)>\sum _{\stackrel {p\,\mid \,n}{p{\text{ prime}}}}K_{b}(p)+\sum _{\stackrel {p^{2}\,\mid \,n}{p{\text{ prime}}}}K_{b}(v_{p}(n)).$
  