OFFSET
0,3
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n-k)*Bell(k)^2.
PROG
(Maxima) makelist(sum((-1)^(n-k)*belln(k)^2, k, 0, n), n, 0, 30);
(Python)
from itertools import accumulate, islice
def A217144_gen(): # generator of terms
yield 1
blist, b, c, f = (1, ), 1, 1, 1
while True:
blist = list(accumulate(blist, initial=(b:=blist[-1])))
yield (f:=-f)*(c := c+f*b**2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emanuele Munarini, Sep 27 2012
STATUS
approved