OFFSET
1,2
COMMENTS
Let the arithmetic mean of the digits of a 'D' digit number n be 'A', let 'N' = number of distinct numbers that can be formed by permuting the digits of n, and let 'I' = concatenation of 1 'D' times = (10^D-1)/9. then a(n) = A*N*I. E.g., let n = 324541, then A = (3+2+4+5+4+1)/6 = 19/6, N = 6!/(2!) = 360, I = 111111, and a(n) = A*N*I = (19/6)*(360)*(111111) = 126666540. - Amarnath Murthy, Jul 14 2003
It seems that the first person who studied the sum of different permutations of digits of a given number was the French scientist Eugène Aristide Marre (1823-1918). See links. - Bernard Schott, Dec 06 2012
REFERENCES
Amarnath Murthy, An interesting result in combinatorics, Mathematics & Informatics Quarterly, Vol. 3, 1999, Bulgaria.
LINKS
A. Dunigan AtLee, Table of n, a(n) for n = 1..100000.
A. Marre, Trouver la somme de toutes les permutations différentes d'un nombre donné., Nouvelles Annales de Mathématiques, 1ère série, tome 5 (1846), p. 57-60.
Norbert Verdier, QDV4 : Marre, Marre et Marre, page=1 (French mathematical forum les-mathematiques.net)
FORMULA
MAPLE
f:= proc(x) local L, D, n, M, s, j;
L:= convert(x, base, 10);
D:= [seq(numboccur(j, L), j=0..9)];
n:= nops(L);
M:= n!/mul(d!, d=D);
s:= add(j*D[j+1], j=0..9);
(10^n-1)*M/9/n*s
end proc:
map(f, [$1..100]); # Robert Israel, Jul 07 2015
MATHEMATICA
Table[Total[FromDigits /@ Permutations[IntegerDigits[n]]], {n, 100}] (* T. D. Noe, Dec 06 2012 *)
PROG
(PARI) A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
A055642(n) = #Str(n);
A007953(n) = sumdigits(n);
(PARI) A045876(n) = {my(d=digits(n), q=1, v, t=1); v = vecsort(d); for(i=1, #v-1, if(v[i]==v[i+1], t++, q*=binomial(i, t); t=1)); q*binomial(#v, t)*(10^#d-1)*vecsum(d)/9/#d} \\ David A. Corneth, Oct 06 2016
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved