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.

Showing 1-3 of 3 results.

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.

Original entry on oeis.org

1, 16, 222, 2777, 33333, 388888, 4444444, 49999999, 555555555, 46464646464, 4102564102563, 377777777777777, 35947712418300653, 3508771929824561403, 349206349206349206348, 35265700483091787439613, 3599999999999999999999999
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

For n < 10 there are n! distinct numbers.

Examples

			a(3) = floor((123 + 132 + 213 + 231 + 312 + 321)/6) = 222;
a(4) = floor((1234 + 1243 + 1324 + 1342 + 1423 + 1432 + ... + 4312 + 4321)/24) = 66660/24 = 2777.
		

Crossrefs

Programs

  • 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));
          floor((10^t-1)/9*add(i*l[i+1], i=1..9)/t)
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Jan 05 2019
  • 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
    
  • Python
    def A078266(n):
        s = ''.join(str(i) for i in range(1,n+1))
        return sum(int(d) for d in s)*(10**len(s)-1)//(9*len(s)) # Chai Wah Wu, Jan 04 2019

Formula

a(n) = A007953(A007908(n))*(10^A055642(A007908(n))-1)/(9*A055642(A007908(n))). - Chai Wah Wu, Jan 06 2019

Extensions

More terms from Max Alekseyev, Jan 24 2012

A078265 Integer part of the geometric mean of all the distinct numbers formed by permuting the digits of concatenation of numbers from 1 to n.

Original entry on oeis.org

1, 15, 207, 2544, 30091, 347096, 3931343, 43906441, 484912312, 5306957044
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

For n < 10 there are n! distinct numbers.

Examples

			a(3) = floor((123*132*213*231*312*321)^(1/6)) = floor(207.581...) = 207.
a(4) = floor((1234*1243*1324*1342*1423*1432*...*4312*4321)^(1/24)) = floor(2544.967...) = 2544.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[ (Times @@ FromDigits /@ Permutations[Range[n]])^(1/n!) ]; Table[a[n], {n, 1, 10}] (* Ryan Propper, Jul 21 2006 *)

Extensions

More terms from Ryan Propper, Jul 21 2006

A217446 Sum of the squares of numbers obtained by digit permutations of the concatenation of first n numbers.

Original entry on oeis.org

1, 585, 331668, 213208980, 156226437720, 129158041750920, 119164964083502400, 121503028361696976960, 135757575541042424323200, 165013333307050666667644800, 216831999996550400000012812800, 306342399999513113600000180544000, 463124479999926454528000002723302400
Offset: 1

Views

Author

Roger Cuculière, Oct 03 2012

Keywords

Examples

			a(1) = 1^2 = 1.
a(2) = 12^2 + 21^2 = 585.
a(3) = 123^2 + 132^2 + 213^2 + 231^2 + 312^2 + 321^2 = 331668.
		

Crossrefs

Cf. A071268.

Programs

  • Maple
    R:= n-> (10^n-1)/9: RP:= n-> (10^(2*n)-1)/99:
    a:= n-> (1/12)*(n+1)!*(n*RP(n)+(3*n+2)*R(n)^2):
    seq (a(n), n=1..15);  # Alois P. Heinz, Oct 03 2012

Formula

a(n) = (1/12)*(n+1)!*(n*R'(n)+(3*n+2)*R(n)^2) with R(n) = (10^n-1)/9 and R'(n) = (10^(2*n)-1)/99.

Extensions

More terms from Alois P. Heinz, Oct 03 2012
Showing 1-3 of 3 results.