OFFSET
1,2
FORMULA
PROG
(PARI) isok(k) = sumdigits(k, 6) == sumdigits(k, 7); \\ Michel Marcus, Mar 18 2023
(Python)
from numpy import base_repr
def ok(n):
return sum(map(int, base_repr(n, 6))) == sum(map(int, base_repr(n, 7)))
print([n for n in range(1, 10**5) if ok(n)])
# Christoph B. Kassir, Apr 05 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved