login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071268 Sum of all digit permutations of the concatenation of first n numbers. 4
1, 33, 1332, 66660, 3999960, 279999720, 22399997760, 2015999979840, 201599999798400, 927359999990726400, 1064447999999893555200, 2058376319999997941623680, 4439635199999999955603648000, 10585935359999999998941406464000, 27655756127999999999972344243872000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The permutations yield n! different numbers and if they are stacked vertically then the sum of each column is (n-1)! times the n-th triangular number = (n-1)!*n(n+1)/2. a(n) = [(n+1)!/2]*[{10^n -1}/9]. Note that this is only valid for 1 <= n <= 9.

The first person who studied the sum of different permutations of digits of a given number seems to be the French scientist Eugène Aristide Marre (1823-1918). See links. - Bernard Schott, Dec 07 2012

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..208, Jan 04 2019

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 and Raymond Cordier, QDV4 : Marre, Marre et Marre, page=1 (French mathematical forum les-mathematiques.net)

FORMULA

a(n) = (n + 1)!*(10^n - 1)/18 for 1 <= n <= 9.

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

EXAMPLE

For n=3, a(n) = 123 + 132 + 213 + 231 + 312 + 321 = 1332. - Michael B. Porter, Aug 28 2016

MAPLE

a:= proc(n) local s, t, l;

      s:= cat("", seq(i, i=1..n)); t:= length(s);

      l:= (p-> seq(coeff(p, x, i), i=0..9))(add(x^parse(s[i]), i=1..t));

      (10^t-1)/9*combinat[multinomial](t, l)*add(i*l[i+1], i=1..9)/t

    end:

seq(a(n), n=1..20);  # Alois P. Heinz, Jan 04 2019

MATHEMATICA

Table[Total@ Map[FromDigits, Permutations@ Flatten@ Map[IntegerDigits, Range@ n]], {n, 10}] (* or *)

Table[Function[d, (((10^Length@ d - 1)/9)* Length@ Union@ Map[FromDigits, Permutations@ d] Total[d])/Length@ d]@ Flatten@ Map[IntegerDigits, Range@ n], {n, 11}] (* Michael De Vlieger, Aug 30 2016, latter after Harvey P. Dale at A047726 *)

PROG

(PARI) A007908(n) = my(s=""); for(k=1, n, s=Str(s, k)); eval(s);

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(A007908(n))-1)/9)*(A047726(A007908(n))*A007953(A007908(n))/(A055642(A007908(n)))); \\ Altug Alkan, Aug 28 2016

(Python)

from math import factorial

from operator import mul

from functools import reduce

def A071268(n):

    s = ''.join(str(i) for i in range(1, n+1))

    return sum(int(d) for d in s)*factorial(len(s)-1)*(10**len(s)-1)//(9*reduce(mul, (factorial(d) for d in (s.count(w) for w in set(s))))) # Chai Wah Wu, Jan 04 2019

CROSSREFS

Cf. A045876, A047726, A007908.

Sequence in context: A294436 A242492 A065424 * A012805 A093756 A284333

Adjacent sequences:  A071265 A071266 A071267 * A071269 A071270 A071271

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Jun 01 2002

EXTENSIONS

Edited by Robert G. Wilson v, Jun 03 2002

Corrected by Altug Alkan, Aug 28 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 18:43 EDT 2019. Contains 323444 sequences. (Running on oeis4.)