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.
%I A078266 #24 Jan 07 2019 02:15:24 %S A078266 1,16,222,2777,33333,388888,4444444,49999999,555555555,46464646464, %T A078266 4102564102563,377777777777777,35947712418300653,3508771929824561403, %U A078266 349206349206349206348,35265700483091787439613,3599999999999999999999999 %N A078266 Integer part of the arithmetic mean of all the distinct numbers formed by permuting the digits of concatenation of numbers from 1 to n. %C A078266 For n < 10 there are n! distinct numbers. %H A078266 Chai Wah Wu, <a href="/A078266/b078266.txt">Table of n, a(n) for n = 1..369</a> %F A078266 a(n) = A007953(A007908(n))*(10^A055642(A007908(n))-1)/(9*A055642(A007908(n))). - _Chai Wah Wu_, Jan 06 2019 %e A078266 a(3) = floor((123 + 132 + 213 + 231 + 312 + 321)/6) = 222; %e A078266 a(4) = floor((1234 + 1243 + 1324 + 1342 + 1423 + 1432 + ... + 4312 + 4321)/24) = 66660/24 = 2777. %p A078266 a:= proc(n) local s, t, l; %p A078266 s:= cat("", seq(i, i=1..n)); t:= length(s); %p A078266 l:= (p-> seq(coeff(p, x, i), i=0..9))(add(x^parse(s[i]), i=1..t)); %p A078266 floor((10^t-1)/9*add(i*l[i+1], i=1..9)/t) %p A078266 end: %p A078266 seq(a(n), n=1..20); # _Alois P. Heinz_, Jan 05 2019 %o A078266 (PARI) { a(n) = c=vector(10); for(i=1,n, s=eval(Vec(Str(i))); for(j=1,#s,c[s[j]+1]++); ); l=sum(j=1,10,c[j]); (10^l-1)/9*sum(j=1,10,(j-1)*c[j])\l } \\ _Max Alekseyev_ %o A078266 (Python) %o A078266 def A078266(n): %o A078266 s = ''.join(str(i) for i in range(1,n+1)) %o A078266 return sum(int(d) for d in s)*(10**len(s)-1)//(9*len(s)) # _Chai Wah Wu_, Jan 04 2019 %Y A078266 Cf. A071268, A078265. %K A078266 base,nonn %O A078266 1,2 %A A078266 _Amarnath Murthy_, Nov 24 2002 %E A078266 More terms from _Max Alekseyev_, Jan 24 2012