# [seqfan] Re: number of different digit patterns of n-digit numbers

David Wilson dwilson at gambitcomm.com
Fri Aug 28 19:26:06 CEST 2009

```I asked because I was unable to reproduce the values below using
Stirlings. Maybe it was just me.

franktaw at netscape.net wrote:
> Yes, it is the sum of the first k Stirling numbers of the second kind.
>
> I didn't use that for the PARI program since PARI (at least the version
> I currently have) doesn't have a primitive for Stirling numbers.
>
>
>
> -----Original Message-----
> From: David Wilson <davidwwilson at comcast.net>
>
> Would this sequence have a formula in terms of Stirling number of the
> second
> kind?
>
> ----- Original Message -----
> From: <franktaw at netscape.net>
> To: <seqfan at list.seqfan.eu>
> Sent: Thursday, August 27, 2009 6:44 PM
> Subject: [seqfan] Re: number of different digit patterns of n-digit
> numbers
>
>
>> This is just the number of set partitions of n into at most 10 parts.
>> The condition that the first ball not go in the first box is not
>> relevant; you can always permute the digits so that the first one is
>> not zero.
>>
>> Sequences of this type are in the OEIS for up to 8 (i.e., set
>> partitions into at most 8 parts, which is A099263).
>>
>> Here's a PARI program to generate sequences of this type:
>>
>>
> a(n,k)=local(ps);ps=exp(sum(i=1,k,x^i/i!)+x*O(x^n));vector(n,i,polcoeff(p
>
>> s,i)*i!)
>>
>> Here n is the number of terms you want, and k is the maximum number of
>> parts.  For k = 10, we get:
>>
>> 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115975, 678569, 4213584,
>> 27644267, 190897305, 1382935569, 10479884654, 82861996310,
>> 682044632178, 5832378929502, 51720008131148, 474821737584174,
>> 4506150050048604, 44145239041717738, 445876518513670356,
>> 4637570299337888742, 49618383871367215282, 545551902886241817684,
>> 6158380541703927984540, 71311068810038965177080,
>> 846359710104516310431744
>>
>>
>> -----Original Message-----
>> From: Tanya Khovanova <mathoflove-seqfan at yahoo.com>
>>
>> Dear Sequence Fans,
>>
>> I would like to propose a new sequence:
>>
>> Number of different digit patterns of n-digit numbers.
>> or
>> Number of ways to put n labeled balls into 10 indistinguishable boxes
>> so that
>> the first ball can't go into the first box.
>> or
>> Number of equivalence classes of n-digit numbers with respect to digit
>> permutations.
>>
>> The sequence starts at Bell numbers: 1,2,5,15,52,203,877,4140,21147,
>> but are not
>> Bell numbers.
>>
>> I know that OEIS is on vacation, but I need this sequence for my blog
>> essay. So
>> I am not sure if I should submit.
>>
>> Besides, I need more terms to distinguish it from Bell numbers.
>>
>> What should I do, and can you help?
>>
>> Tanya
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
>

```