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.

Previous Showing 11-13 of 13 results.

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

A061381 Smallest "inconsummate number" in base n greater than in the previous base.

Original entry on oeis.org

13, 17, 29, 46, 64, 86, 105, 136, 161, 200, 229, 276, 309, 362, 419, 460, 505, 572, 621, 694, 749, 830, 889, 978, 1054, 1136, 1205, 1306, 1381, 1490, 1569, 1684, 1769, 1892, 1999, 2112, 2205, 2342, 2441, 2584, 2689, 2840, 2949, 3106, 3269, 3386, 3505, 3678
Offset: 2

Views

Author

Robert G. Wilson v, Jun 08 2001

Keywords

Crossrefs

Cf. A052491.

Programs

  • Mathematica
    n = 1; Do[ While[k = n; While[ Apply[ Plus, IntegerDigits[k, b] ]*n != k && k < 100n, k += n]; k != 100n, n++ ]; Print[n], {b, 2, 60} ]
  • Python
    from functools import lru_cache
    from itertools import count, combinations_with_replacement
    from sympy.ntheory import digits
    @lru_cache(maxsize=None)
    def A061381(n):
        for k in count((0 if n <= 2 else A061381(n-1))+1):
            for l in count(1):
                if (n-1)*l*k < n**(l-1):
                    return k
                for d in combinations_with_replacement(range(n),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*k,n)[1:]) == list(d):
                        break
                else:
                    continue
                break # Chai Wah Wu, May 09 2023

A137225 Triangle T(k,q) of minimal q-Niven numbers: smallest number such that the sum of its digits in base q equals k, 2<=q<=k+1.

Original entry on oeis.org

1, 3, 2, 7, 5, 3, 15, 8, 7, 4, 31, 17, 11, 9, 5, 63, 26, 15, 14, 11, 6, 127, 53, 31, 19, 17, 13, 7, 255, 80, 47, 24, 23, 20, 15, 8, 511, 161, 63, 49, 29, 27, 23, 17, 9, 1023, 242, 127, 74, 35, 34, 31, 26, 19, 10, 2047, 485, 191, 99, 71, 41, 39, 35, 29, 21, 11, 4095, 728, 255
Offset: 1

Views

Author

R. J. Mathar, Mar 07 2008

Keywords

Examples

			T(8,4) =47 because 47, written 233 in base q=4, is the smallest number with
digit sum 2+3+3=8=k in base q=4. The triangle reads T(k,q), k=1,2,...,
2<=q up to the diagonal, after which the values stay constant:
1 1 1 1 1 1 1 1 1
3 2 2 2 2 2 2 2 2
7 5 3 3 3 3 3 3 3
15 8 7 4 4 4 4 4 4
31 17 11 9 5 5 5 5 5
63 26 15 14 11 6 6 6 6
127 53 31 19 17 13 7 7 7
255 80 47 24 23 20 15 8 8
511 161 63 49 29 27 23 17 9
1023 242 127 74 35 34 31 26 19
...
		

Crossrefs

Programs

  • Maple
    sd := proc(n,b) local i ; add(i,i=convert(n,base,b)) ; end: T := proc(k,q) local a; for a from 1 do if sd(a,q) = k then RETURN(a) ; fi ; od: end: for k from 1 to 20 do for q from 2 to k+1 do printf("%d, ",T(k,q)) ; od: od:

Formula

T(k,2)=A000225(k). T(k,k+1)=2k-1. Conjecture: T(k,3)=A062318(k), verified up to k=23.
Previous Showing 11-13 of 13 results.