cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Keywords

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.

Crossrefs

Same beginning as A033865. Cf. A061147.

Programs

  • 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 *)
  • 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

Formula

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