OFFSET
0,2
FORMULA
a(n) = Sum_{k=0..n} Bell(k)^2.
MATHEMATICA
Accumulate[BellB[Range[0, 20]]^2] (* Bruno Berselli, Sep 27 2012 *)
PROG
(Maxima) makelist(sum(belln(k)^2, k, 0, n), n, 0, 30);
(Magma) [&+[Bell(i)^2: i in [0..n]]: n in [0..20]]; // Bruno Berselli, Sep 27 2012
(Python)
from itertools import accumulate, islice
def A217143_gen(): # generator of terms
yield 1
blist, b, c = (1, ), 1, 1
while True:
blist = list(accumulate(blist, initial=(b:=blist[-1])))
yield (c := c+b**2)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emanuele Munarini, Sep 27 2012
STATUS
approved