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.

Previous Showing 11-17 of 17 results.

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

Original entry on oeis.org

1, 33, 1332, 66660, 3999960, 279999720, 22399997760, 2015999979840, 201599999798400, 927359999990726400, 1064447999999893555200, 2058376319999997941623680, 4439635199999999955603648000, 10585935359999999998941406464000, 27655756127999999999972344243872000
Offset: 1

Views

Author

Amarnath Murthy, Jun 01 2002

Keywords

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

Examples

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

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

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

Extensions

Edited by Robert G. Wilson v, Jun 03 2002
Corrected by Altug Alkan, Aug 28 2016

A275945 Numbers n such that the average of different permutations of digits of n is an integer.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111
Offset: 1

Views

Author

Altug Alkan, Aug 29 2016

Keywords

Comments

Complement of A273492.
Permutations with a first digit of 0 are included in the average (i.e. 0010 is taken to be 10, 01 is taken to be 1, etc.).
From Robert Israel, Sep 01 2016: (Start)
n such that A002275(A055642(n))*A007953(n) is divisible by A055642(n).
In particular, contains all k-digit numbers if k is in A014950. (End)

Examples

			97 is a term because (97+79) is divisible by 2.
100 is a term because (1+10+100) is divisible by 3.
123 is a term because (123+132+213+231+312+321) is divisible by 6.
1001 is not a term because (11+101+110+1001+1010+1100) is not divisible by 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L, d, s;
      L:= convert(n, base, 10);
      d:= nops(L);
      s:= convert(L, `+`);
      evalb(s*(10^d-1)/9 mod d = 0)
    end proc:
    select(f, [$1..10000]); # Robert Israel, Sep 01 2016
  • Mathematica
    Select[Range@ 111, IntegerQ@ Mean@ Map[FromDigits, Permutations@ #] &@ IntegerDigits@ # &] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    for(n=1, 2000, if((((10^A055642(n)-1)/9)*A007953(n)) % A055642(n) == 0, print1(n, ", ")));

A273492 Numbers n such that the average of different permutations of digits of n is not an integer.

Original entry on oeis.org

10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 1000, 1001, 1002, 1004, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1017, 1018, 1019, 1020, 1022, 1023, 1024
Offset: 1

Views

Author

Altug Alkan, Aug 29 2016

Keywords

Comments

Complement of A275945.
Permutations with a first digit of 0 are included in the average (i.e. 0010 is taken to be 10, 01 is taken to be 1, etc.).
From Robert Israel, Sep 01 2016: (Start)
n such that A002275(A055642(n))*A007953(n) is not divisible by A055642(n).
In particular, contains no k-digit numbers if k is in A014950. (End)

Examples

			12 is a term because (12+21) = 33 is not divisible by 2.
1000 is a term because (1+10+100+1000) = 1111 is not divisible by 4.
123 is not a term because (123+132+213+231+312+321) is divisible by 6.
1001 is a term because (11+101+110+1001+1010+1100) is not divisible by 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,d,s;
      L:= convert(n,base,10);
      d:= nops(L);
      s:= convert(L,`+`);
      evalb(s*(10^d-1)/9 mod d = 0)
    end proc:
    remove(f, [$1..10000]); # Robert Israel, Sep 01 2016
  • Mathematica
    Select[Range[2^10], ! IntegerQ@ Mean@ Map[FromDigits, Permutations@ #] &@ IntegerDigits@ # &] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    A055642(n) = #Str(n);
    A007953(n) = sumdigits(n);
    for(n=1, 2000, if((((10^A055642(n)-1)/9)*A007953(n)) % A055642(n) != 0, print1(n, ", ")));

A276354 Palindromes n > 0 such that the sum of all distinct permutations of the digits of n is also a palindrome.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 191, 202, 212, 222, 232, 242, 252, 272, 303, 313, 323, 333, 353, 404, 414, 434, 444, 515, 555, 666, 777, 787, 868, 888, 949, 999, 1001, 1111, 1221, 2002, 2112, 2222, 2992
Offset: 1

Views

Author

Altug Alkan, Sep 05 2016

Keywords

Comments

Values of A002113(n) such that A045876(A002113(n)) is in A002113 (n > 0).
If n has a zero digit then the permutations starting with 0 are included in the sum (i.e., 0010 is taken to be 10, 01 is taken to be 1, etc.).
A010785(n) is an obvious term of this sequence for all n > 0.

Examples

			101 is a term because 11 + 101 + 110 = 222 is also a palindrome.
232 is a term because 223 + 232 + 322 = 777 is also a palindrome.
2002 is a term because 22 + 202 + 220 + 2002 + 2020 + 2200 = 6666 is also a palindrome.
		

Crossrefs

Programs

A276590 Pandigital numbers n such that sum of all permutations of digits of n is also a pandigital number. Sequence lists the least ones of corresponding permutational classes.

Original entry on oeis.org

10234567889, 100223456789, 100234566789, 100234567889, 101234556789, 101234567789, 102234456789, 102234566789, 102334556789, 102334567899, 102344456789, 102344567889, 102345567789, 102345666789, 102345677789, 102345678899, 1000223456789, 1000234456789, 1000234566789
Offset: 1

Views

Author

Robert Israel and Altug Alkan, Sep 06 2016

Keywords

Comments

The least pandigital number in A276510 is 10234567889.
Each member of the sequence has digits in increasing order except that the first digit is 1.
The sequence has 1 member with 11 digits, 15 with 12 digits, 90 with 13 digits, 261 with 14 digits and 1190 with 15 digits.

Examples

			100223456789 is a term because A045876(100223456789) = 52113599999947886400 is pandigital.
		

Crossrefs

Programs

  • Maple
    pandig:= n -> evalb(nops(convert(convert(n,base,10),set))=10):
    sump:= 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:
    n0:= 1023456789:
    rep:= proc(n) local L,n0,i;
      L:= sort(convert(n,base, 10));
      n0:= numboccur(0, L);
      L:= subsop(1=1,n0+1=0,L);
      add(L[-i-1]*10^(i),i=0..nops(L)-1); end proc:
    sort(convert(map(rep,
    select(pandig @ sump, {seq(seq(n0*10^d+x,x=0..10^d-1),d=0..3)})),list));

A276716 a(n) = A007953(n)*A047726(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 6, 8, 10, 12, 14, 16, 18, 20, 4, 6, 4, 10, 12, 14, 16, 18, 20, 22, 6, 8, 10, 6, 14, 16, 18, 20, 22, 24, 8, 10, 12, 14, 8, 18, 20, 22, 24, 26, 10, 12, 14, 16, 18, 10, 22, 24, 26, 28, 12, 14, 16, 18, 20, 22, 12, 26, 28, 30, 14, 16, 18, 20, 22, 24, 26, 14, 30, 32, 16
Offset: 1

Views

Author

Altug Alkan, Sep 17 2016

Keywords

Crossrefs

Programs

  • PARI
    A047726(n) = n=eval(Vec(Str(n))); (#n)!/prod(i=0, 9, sum(j=1, #n, n[j]==i)!);
    A007953(n) = sumdigits(n);
    a(n) = A007953(n)*A047726(n);

A276596 Least k such that A276502(k) = n.

Original entry on oeis.org

1, 10, 100, 1000, 10000, 101, 1000000, 1001
Offset: 1

Views

Author

Altug Alkan, Sep 11 2016

Keywords

Crossrefs

Cf. A276502.

Programs

Previous Showing 11-17 of 17 results.