login
a(n) = A078199(n)/n; i.e., smallest k such that frequency of each occurring digit in k*n is the same.
1

%I #12 Jul 29 2017 20:08:46

%S 11,10,1,1,1,1,1,1,1,1,10,1,5,4,3,2,3,2,2,2,1,5,5,1,1,1,1,1,1,1,1,4,1,

%T 4,1,1,1,1,1,1,1,3,1,1,3,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,3,1,1,1,1,3,

%U 1,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,1,2,11,1

%N a(n) = A078199(n)/n; i.e., smallest k such that frequency of each occurring digit in k*n is the same.

%C a(211) = 13 is the first term that is not a palindrome (treating 10 as "010", a palindrome with leading zeros).

%e a(112) = 560/112 = 5.

%t balanced[n_] := Module[{u, d, r}, u=Union[d=Sort[IntegerDigits[n]]]; IntegerQ[r=Length[d]/Length[u]]&&d==Sort[Flatten[Table[u, {r}]]]]; a[n_] := For[k=1, True, k++, If[balanced[k*n], Return[k]]]

%Y Cf. A078199.

%K base,nonn

%O 100,1

%A _Amarnath Murthy_, Nov 21 2002

%E Corrected and extended by _Sascha Kurz_, Jan 09 2003

%E Edited by _Dean Hickerson_, Jan 17 2003