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.

A071268 Sum of all digit permutations of the concatenation of first n numbers.

This page as a plain text file.
%I A071268 #58 Mar 26 2020 11:13:59
%S A071268 1,33,1332,66660,3999960,279999720,22399997760,2015999979840,
%T A071268 201599999798400,927359999990726400,1064447999999893555200,
%U A071268 2058376319999997941623680,4439635199999999955603648000,10585935359999999998941406464000,27655756127999999999972344243872000
%N A071268 Sum of all digit permutations of the concatenation of first n numbers.
%C A071268 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.
%C A071268 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
%H A071268 Alois P. Heinz, <a href="/A071268/b071268.txt">Table of n, a(n) for n = 1..208</a>, Jan 04 2019
%H A071268 A. Marre, <a href="http://archive.numdam.org/item/NAM_1846_1_5__57_1/">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 A071268 Norbert Verdier and Raymond Cordier, <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 A071268 a(n) = (n + 1)!*(10^n - 1)/18 for 1 <= n <= 9.
%F A071268 a(n) = ((10^A055642(A007908(n))-1)/9)*(A047726(A007908(n))*A007953(A007908(n))/(A055642(A007908(n)))). - _Altug Alkan_, Aug 28 2016
%e A071268 For n=3, a(3) = 123 + 132 + 213 + 231 + 312 + 321 = 1332. - _Michael B. Porter_, Aug 28 2016
%p A071268 a:= proc(n) local s, t, l;
%p A071268       s:= cat("", seq(i, i=1..n)); t:= length(s);
%p A071268       l:= (p-> seq(coeff(p, x, i), i=0..9))(add(x^parse(s[i]), i=1..t));
%p A071268       (10^t-1)/9*combinat[multinomial](t, l)*add(i*l[i+1], i=1..9)/t
%p A071268     end:
%p A071268 seq(a(n), n=1..20);  # _Alois P. Heinz_, Jan 04 2019
%t A071268 Table[Total@ Map[FromDigits, Permutations@ Flatten@ Map[IntegerDigits, Range@ n]], {n, 10}] (* or *)
%t A071268 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 *)
%o A071268 (PARI) A007908(n) = my(s=""); for(k=1, n, s=Str(s, k)); eval(s);
%o A071268 A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
%o A071268 A055642(n) = #Str(n);
%o A071268 A007953(n) = sumdigits(n);
%o A071268 a(n) = ((10^A055642(A007908(n))-1)/9)*(A047726(A007908(n))*A007953(A007908(n))/(A055642(A007908(n)))); \\ _Altug Alkan_, Aug 28 2016
%o A071268 (Python)
%o A071268 from math import factorial
%o A071268 from operator import mul
%o A071268 from functools import reduce
%o A071268 def A071268(n):
%o A071268     s = ''.join(str(i) for i in range(1,n+1))
%o A071268     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
%Y A071268 Cf. A045876, A047726, A007908.
%K A071268 base,nonn
%O A071268 1,2
%A A071268 _Amarnath Murthy_, Jun 01 2002
%E A071268 Edited by _Robert G. Wilson v_, Jun 03 2002
%E A071268 Corrected by _Altug Alkan_, Aug 28 2016