%I #18 Mar 06 2022 15:07:51
%S 0,1,3,5,6,7,8,9,10,11,12,13,15,17,18,19,20,21,22,23,28,36,37,39,41,
%T 42,43,44,45,46,47,50,60,61,63,65,66,67,68,69,70,71,72,73,75,77,78,79,
%U 80,81,82,83,84,85,87,89,90,91,92,93,94,95,96,97,99,101,102,103,104
%N Numbers whose base-12 representation has the same number of 2's and 4's.
%t Select[Range[0,150],DigitCount[#,12,2]==DigitCount[#,12,4]&] (* _Harvey P. Dale_, Mar 06 2022 *)
%o (PARI) f(n, b, d) = #select(x->x==d, digits(n, b));
%o select(n->f(n, 12, 2)==f(n, 12, 4), [0..230]) \\ _Petros Hadjicostas_, Jul 09 2020
%K nonn,base,easy
%O 1,3
%A _Olivier GĂ©rard_
|