Jason (jcreed) wrote,

It's time for another round of WTF, The On-Line Encyclopedia of Integer Sequences?

You know how the factorial function has the recurrence
(n+1)! = (n+1) (n!)
and the 'subfactorial' function ---- which counts the derangements of length n --- has the recurrence
!(n+1) = (n+1) (!n) + (-1)^(n+1)

Well, what happens if I put some other root of unity in for that -1? Like, let me say
f(n+1) = (n+1) (f(n)) + (i)^(n+1)
and for the hell of it set f(1) = 1. Then what do I get?
n f(n)
1 1
2 1
3 3-i
4 13-4i
5 65-19i
6 389-114i
7 2723-799i
8 21785-6392i
9 196065-57527i

Aaaand the imaginary part of f(n) is apparently A186359, the "number of permutations of {1,2,...,n} having no up-down cycles". Can't find anything interestingly combinatorial for its real part, but it's (up to a sign flip) the egf of cos(x)/(1+x). (A009102).
Tags: math, sequences

  • (no subject)

    Hey, tiny red cube of jello, do you wanna go for a WALK?

  • (no subject)

    This snarky programming language design checklist (inspired directly by that classic snarky spam solution checklist) came out of some irc…

  • (no subject)

    groen? Is that you? If not, shouldn't it be, really?

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded