|
|
A050727
|
|
Numbers k such that the decimal expansion of 6^k contains no pair of consecutive equal digits (probably finite).
|
|
1
|
|
|
0, 1, 2, 3, 4, 8, 11, 13, 14, 15, 26
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
6^26 = 170581728179578208256 where no consecutive digits are equal.
|
|
MATHEMATICA
|
Select[Range[120], !MemberQ[Differences[IntegerDigits[6^#]], 0]&] (* Harvey P. Dale, Oct 17 2011 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|