The first part's pretty simple. If you consider shorter alphabets:
A 1 letter alphabet has 2: {}, a
A 2 letter alphabet has 3: {}, a, b
A 3 letter alphabet has 5: the 2 from a 1 letter alphabet with c added to it plus the ones from a 2 letter alphabet.
This recurrence sets up the Fibonacci sequence with an of 2 offset.
A 26 letter alphabet has F(28)=317811
Part 2 I can see the recursive structure but it's more complicated. Though very computable, I stopped at 9. Basically you have to multiply the sequence length by the factorial of its length. I'll post my reasoning later but the sequence ends up as https://oeis.org/A072374 and the term for a 26 letter alphabet is
571177352091
|
Posted by Jer
on 2014-03-25 13:09:33 |