A079807 Number of multiples of 3 that can be formed by permuting the digits of n.
1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 1, 0, 0, 6, 0, 0
Offset: 0
Examples
a(12) = 2: (12,21)
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A079806.
Programs
-
Mathematica
Table[Count[FromDigits/@Permutations[IntegerDigits[n]],?(Divisible[ #,3]&)],{n,0,110}] (* _Harvey P. Dale, Apr 22 2019 *)
Formula
a(3*k+1) = a(3*k+2) = 0, a(3*k) = multinomial(m; c(0),...,c(9)) where c(i) is the number of occurrences of digit i in 3*k and m = c(0)+c(1)+...+c(9). - Sean A. Irvine, Aug 27 2025
Extensions
More terms from Sam Alexander, Feb 26 2005