login
A355275
Numbers having more odd than even digits when written in base 3.
2
1, 4, 10, 12, 13, 14, 16, 22, 31, 37, 39, 40, 41, 43, 49, 67, 85, 91, 93, 94, 95, 97, 103, 109, 111, 112, 113, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 129, 130, 131, 133, 139, 145, 147, 148, 149, 151, 157, 175, 193, 199, 201, 202, 203, 205, 211, 229, 256, 274, 280, 282, 283, 284, 286, 292
OFFSET
1,2
COMMENTS
If k is a term, then so is 3*k+1. - Robert Israel, Mar 04 2024
LINKS
MAPLE
filter:= proc(n) local L;
L:= convert(n, base, 3);
numboccur(1, L) > nops(L)/2
end proc:
select(filter, [$1..1000]); # Robert Israel, Mar 04 2024
PROG
(PARI) select( {is_A355275(n)=vecsum(n=digits(n, 3)%2)*2>#n}, [0..299])
(Python)
from sympy.ntheory import digits
def ok(n):
d = digits(n, 3)[1:]
return len(d) < 2*sum(1 for di in d if di%2)
print([k for k in range(293) if ok(k)]) # Michael S. Branicky, Jul 03 2022
CROSSREFS
Cf. A072600 (same in base 2), A352547 (same in base 10).
Sequence in context: A090070 A078005 A370859 * A092428 A170943 A102998
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jul 03 2022
STATUS
approved