login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323416 a(n) = (n-1)! * (10^n - 1) / 9. 1
1, 11, 222, 6666, 266664, 13333320, 799999920, 55999999440, 4479999995520, 403199999959680, 40319999999596800, 4435199999995564800, 532223999999946777600, 69189119999999308108800, 9686476799999990313523200, 1452971519999999854702848000, 232475443199999997675245568000, 39520825343999999960479174656000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Take an n-digit number with distinct digits, add all permutations of the digits, divide by the sum of the digits: the result is a(n).

Proof from David A. Corneth, Jan 14 2019: (Start)

Let m be an n-digit number (without leading 0, where n > 0). Then n! permutations of digits can be formed.

So each digit occurs n!/n = (n-1)! times in each position. Therefore the total sum is (10^n - 1) * (n - 1)! * s where s is the sum of digits of n. Dividing this product by s gives a(n) = (10^n - 1) * (n - 1)!. QED (End)

LINKS

David Cobac, Table of n, a(n) for n = 1..325

G. Villemin, Nombres permutés

FORMULA

Recurrence relation: a(n+1) = n! * 10^n + n * a(n).

Proof: Assume R_n is a string of n 1's (repunit),

a(n) = (n-1)! * R_n so a(n+1) = n! * R_{n+1} = n! * (10^n + R_n);

Thus a(n+1) = n! * 10^n + n! * R_n = n! * 10^n + n * (n-1)! * R_n;

Hence a(n+1) = n! * 10^n + n * a(n).

EXAMPLE

Example for n = 3:

Take the number 569.

Sum the permutations of its digits: 569 + 596 + 659 + 695 + 956 + 965 = 4440.

Add all its digits: 5 + 6 + 9 = 20.

Divide: 4440 / 20 = 222.

General proof for n = 3:

Number: abc where a,b,c are distinct.

The sum of the permutations is 200*(a+b+c) + 20*(a+b+c) + 2*(a+b+c) = 222*(a+b+c), so a(3) = 222.

PROG

(Python3)

f = lambda n:+(n==0) or n*f(n-1)

def seq(n):

   if n==0: return

   l = []

   for i in range(1, n + 1):

       # following line with a string repeat

       # s = int('1'*i)

       s = 0

       for j in range(i):

           s += 10 ** j

       l += [s*f(i-1)]

   return l

(PARI) a(n) = (10^n - 1) / 9 * (n-1)! \\ David A. Corneth, Jan 13 2019

CROSSREFS

Cf. A000142, A002275, A071267. Sum of digits A110728.

Sequence in context: A087402 A048377 A192686 * A308438 A103611 A142541

Adjacent sequences:  A323413 A323414 A323415 * A323417 A323418 A323419

KEYWORD

nonn,easy,base

AUTHOR

David Cobac, Jan 13 2019

EXTENSIONS

Edited by N. J. A. Sloane, Jan 19 2019

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 December 1 22:12 EST 2021. Contains 349435 sequences. (Running on oeis4.)