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.

A355274 Numbers having more even than odd digits when written in base 3.

This page as a plain text file.
%I A355274 #6 Jul 04 2022 14:07:02
%S A355274 0,2,6,8,9,11,15,17,18,19,20,21,23,24,25,26,27,29,33,35,45,47,51,53,
%T A355274 54,55,56,57,59,60,61,62,63,65,69,71,72,73,74,75,77,78,79,80,81,82,83,
%U A355274 84,86,87,88,89,90,92,96,98,99,100,101,102,104,105,106,107,108,110,114,116
%N A355274 Numbers having more even than odd digits when written in base 3.
%o A355274 (PARI) select( {is_A355274(n)=vecsum(n=digits(n,3)%2)*2<#n+!n}, [0..123])
%o A355274 (Python)
%o A355274 from sympy.ntheory import digits
%o A355274 def ok(n):
%o A355274     d = digits(n, 3)[1:]
%o A355274     return len(d) < 2*sum(1 for di in d if di%2 == 0)
%o A355274 print([k for k in range(117) if ok(k)]) # _Michael S. Branicky_, Jul 03 2022
%Y A355274 Cf. A072603 (same in base 2), A352546 (same in base 10).
%K A355274 nonn,base
%O A355274 1,2
%A A355274 _M. F. Hasler_, Jul 03 2022