OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
FORMULA
MATHEMATICA
Select[Range[600], Length[Union[DigitCount[#, 3]]]== 1&]
FromDigits[#, 3]&/@DeleteCases[Flatten[Permutations/@Table[PadRight[{}, 3n, {1, 0, 2}], {n, 3}], 1], _?(#[[1]]==0&)]//Sort (* Harvey P. Dale, May 30 2016 *)
Select[Range@5000, Differences@DigitCount[#, 3]=={0, 0}&] (* Hans Rudolf Widmer, Dec 11 2021 *)
PROG
(Haskell)
a049354 n = a049354_list !! (n-1)
a049354_list = filter f [1..] where
f n = t0 == a062756 n && t0 == a081603 n where t0 = a077267 n
-- Reinhard Zumkeller, Aug 09 2014
(Python)
from sympy.ntheory import count_digits
def ok(n): c = count_digits(n, 3); return c[0] == c[1] == c[2]
print([k for k in range(600) if ok(k)]) # Michael S. Branicky, Nov 15 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved