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.

A050727 Numbers k such that the decimal expansion of 6^k contains no pair of consecutive equal digits (probably finite).

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 11, 13, 14, 15, 26
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Comments

No additional terms up to 25000. - Harvey P. Dale, Oct 17 2011
No additional terms up to 100000. - Michel Marcus, Oct 16 2019
No additional terms up to 10^7. - Lucas A. Brown, Mar 02 2024

Examples

			6^26 = 170581728179578208256 where no consecutive digits are equal.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[120],!MemberQ[Differences[IntegerDigits[6^#]],0]&] (* Harvey P. Dale, Oct 17 2011 *)
  • PARI
    isok(n) = {my(d = digits(6^n), c = d[1]); for (i=2, #d, if (d[i] == c, return (0)); c = d[i];); return (1);} \\ Michel Marcus, Oct 16 2019
    
  • Python
    try: from gmpy2 import mpz; x = mpz(1)
    except: x = 1
    print(0)
    k = 1
    while True:
        print('\b'*42 + str(k), end='')
        x *= 6  # x == 6**k
        y, flag = x, True
        y, a = divmod(y, 10)
        while y > 6:
            b = a
            y, a = divmod(y, 10)
            if a == b:
                flag = False
                break
        if flag: print()
        k += 1
    # Lucas A. Brown, Mar 02 2024