OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
filter:= proc(n) convert(convert(n, base, 2), `+`) = convert(convert(n, base, 3), `+`)+1 end proc:
select(filter, [$1..1000]);
MATHEMATICA
Select[Range[600], Subtract @@ DigitSum[#, {2, 3}] == 1 &] (* Amiram Eldar, Aug 08 2024 *)
PROG
(Python)
from sympy.ntheory import digits
def ok(n): return sum(digits(n, 2)[1:]) == sum(digits(n, 3)[1:]) + 1
print([k for k in range(604) if ok(k)]) # Michael S. Branicky, Aug 08 2024
(PARI) isok(k) = sumdigits(k, 2) == 1 + sumdigits(k, 3); \\ Michel Marcus, Aug 08 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 07 2024
STATUS
approved