cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382461 a(n) is the smallest number whose sum of digits is 2^n.

Original entry on oeis.org

1, 2, 4, 8, 79, 5999, 19999999, 299999999999999, 49999999999999999999999999999, 899999999999999999999999999999999999999999999999999999999, 799999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Offset: 0

Views

Author

Stefano Spezia, Mar 27 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=10^(Floor[2^n/9])(1+2^n-9Floor[2^n/9])-1; Array[a,11,0]
  • Python
    def A382461(n): return (lambda x:(x[1]+1)*10**x[0]-1)(divmod(1<Chai Wah Wu, Mar 29 2025

Formula

a(n) = 10^(floor(2^n/9))*(1 + 2^n - 9*floor(2^n/9)) - 1.
a(n) = A051885(2^n).