login
Sum of different permutations of digits of n (leading 0's allowed).
18

%I #52 May 31 2024 22:07:28

%S 1,2,3,4,5,6,7,8,9,11,11,33,44,55,66,77,88,99,110,22,33,22,55,66,77,

%T 88,99,110,121,33,44,55,33,77,88,99,110,121,132,44,55,66,77,44,99,110,

%U 121,132,143,55,66,77,88,99,55,121,132,143,154,66,77,88,99,110,121,66,143

%N Sum of different permutations of digits of n (leading 0's allowed).

%C 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

%C 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

%D Amarnath Murthy, An interesting result in combinatorics, Mathematics & Informatics Quarterly, Vol. 3, 1999, Bulgaria.

%H A. Dunigan AtLee, <a href="/A045876/b045876.txt">Table of n, a(n) for n = 1..100000</a>.

%H A. Marre, <a href="http://archive.numdam.org/ARCHIVE/NAM/NAM_1846_1_5_/NAM_1846_1_5__57_1/NAM_1846_1_5__57_1.pdf">Trouver la somme de toutes les permutations différentes d'un nombre donné.</a>, Nouvelles Annales de Mathématiques, 1ère série, tome 5 (1846), p. 57-60.

%H Norbert Verdier, <a href="http://www.les-mathematiques.net/phorum/read.php?17,777265">QDV4 : Marre, Marre et Marre, page=1</a> (French mathematical forum les-mathematiques.net)

%F a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)). - _Altug Alkan_, Aug 29 2016

%p f:= proc(x) local L,D,n,M,s,j;

%p L:= convert(x,base,10);

%p D:= [seq(numboccur(j,L),j=0..9)];

%p n:= nops(L);

%p M:= n!/mul(d!,d=D);

%p s:= add(j*D[j+1],j=0..9);

%p (10^n-1)*M/9/n*s

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Jul 07 2015

%t Table[Total[FromDigits /@ Permutations[IntegerDigits[n]]], {n, 100}] (* _T. D. Noe_, Dec 06 2012 *)

%o (PARI) A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);

%o A055642(n) = #Str(n);

%o A007953(n) = sumdigits(n);

%o a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)); \\ Altug Alkan, Aug 29 2016

%o (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

%Y Same beginning as A033865. Cf. A061147.

%K easy,nonn,base,look

%O 1,2

%A _Erich Friedman_