%I #12 Dec 07 2019 12:18:22
%S 1,2,3,3,6,9,9,18,9,9,18,27,27,54,81,81,162,54,54,108,162,162,324,486,
%T 486,972,27,27,54,81,81,162,243,243,486,243,243,486,729,729,1458,2187,
%U 2187,4374,1458,1458,2916,4374,4374,8748,13122,13122,26244,405,405,810
%N Number of irreducible representations of symmetric group S_n whose degree is not divisible by 3.
%D I. G. MacDonald, On the degrees of the irreducible representations of symmetric groups, Bull. London Math. Soc. 3 (1971), 189-192
%H Eric M. Schmidt, <a href="/A060840/b060840.txt">Table of n, a(n) for n = 1..1000</a>
%F If n = sum a_i*3^e[i] in base 3 where a_i is 0, 1, 2 then a(n) = product g(i) where if a(i) = 0 g(i) = 1, if a(i) = 1 g(i) = 3^i, if a(i) = 2 g(i) = 3^i * (3^i + 3) / 2
%e a(4) = 3 because the degrees for S_4 are 1,1,2,3,3 and by the formula: 4 in base 3 is 11 and a(4) = 1*3
%t a[n_] := (id = IntegerDigits[n, 3]; lg = Length[id]; Times @@ Table[ Which[ id[[lg-i]] == 0, 1, id[[lg-i]] == 1, 3^i, True, 3^i*(3^i+3)/2], {i, lg-1, 0, -1}]); Table[a[n], {n, 1, 56}] (* _Jean-François Alcover_, Apr 30 2013 *)
%o (Sage)
%o def A060840(n) : dig = n.digits(3); return prod([1, 3^m, 3^m*(3^m+3)//2][dig[m]] for m in range(len(dig)))
%o # _Eric M. Schmidt_, Apr 30 2013
%Y Cf. A059867.
%K nonn,easy
%O 1,2
%A Noam Katz (noamkj(AT)hotmail.com), May 02 2001
%E More terms from Larry Reeves (larryr(AT)acm.org), May 10 2001