[go: up one dir, main page]

login
A045876
Sum of different permutations of digits of n (leading 0's allowed).
18
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, 88, 99, 110, 121, 33, 44, 55, 33, 77, 88, 99, 110, 121, 132, 44, 55, 66, 77, 44, 99, 110, 121, 132, 143, 55, 66, 77, 88, 99, 55, 121, 132, 143, 154, 66, 77, 88, 99, 110, 121, 66, 143
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. 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
a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)). - Altug Alkan, Aug 29 2016
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);
a(n) = ((10^A055642(n)-1)/9)*(A047726(n)*A007953(n)/A055642(n)); \\ Altug Alkan, Aug 29 2016
(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
Same beginning as A033865. Cf. A061147.
Sequence in context: A265558 A082273 A256755 * A033865 A364274 A118764
KEYWORD
easy,nonn,base,look
STATUS
approved