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.

A051640 a(n) contains the digit b-1 in all bases b from 2 to n.

Original entry on oeis.org

1, 2, 7, 14, 23, 47, 47, 239, 239, 239, 239, 5927, 13679, 13679, 13679, 57119, 159119, 500399, 500399, 1627919, 2585519, 3694397, 7305479, 17067599, 41126399, 41126399, 41126399, 61483967, 586370399, 589188599, 1278033119, 1278033119, 1278033119, 1278033119, 1278033119
Offset: 2

Views

Author

Jeff Burch, Jun 04 2000

Keywords

Examples

			47 = 101111 (base 2), 1202 (base 3), 233 (base 4), 142 (base 5), 115 (base 6), 65 (base 7), 57 (base 8). Base 2 representation contains digit 1, base 3 representation contains digit 2, base 4 representation contains digit 3, etc., so a(8)=47.
		

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def A051640(n):
        m = 0
        while True:
            for b in range(2,n+1):
                if b-1 not in digits(m,b)[1:]:
                    break
            else:
                return m
            m += 1 # Chai Wah Wu, May 18 2020

Extensions

More terms from Ulrich Schimke (ulrschimke(AT)aol.com), Jun 12 2000
Definition corrected by Franklin T. Adams-Watters, Apr 10 2006
a(34)-a(36) from Chai Wah Wu, May 18 2020