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.

A058905 Inconsummate numbers in base 9: no number is this multiple of the sum of its digits (in base 9).

Original entry on oeis.org

46, 47, 48, 56, 58, 66, 76, 86, 136, 138, 167, 176, 222, 227, 228, 248, 258, 298, 302, 308, 312, 316, 318, 338, 343, 344, 347, 348, 352, 354, 356, 358, 362, 374, 383, 384, 392, 398, 402, 403, 404, 406, 407, 408, 411, 412, 414, 416, 422, 423
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058905_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if l*n<<3 < 9**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(9),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,9)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058905_list = list(islice(A058905_gen(),20)) # Chai Wah Wu, May 10 2023