# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a217144 Showing 1-1 of 1 %I A217144 #12 Jun 22 2022 14:49:41 %S A217144 1,0,4,21,204,2500,38709,730420,16409180,430786429,13019414196, %T A217144 447437830704,17306961847705,746907935199264,35695643204860420, %U A217144 1876878693983656605,107956500727342113004,6758630146906528885412,458470139353155531447869 %N A217144 Alternating sums of squares of Bell numbers (A000110). %F A217144 a(n) = Sum_{k=0..n} (-1)^(n-k)*Bell(k)^2. %o A217144 (Maxima) makelist(sum((-1)^(n-k)*belln(k)^2,k,0,n),n,0,30); %o A217144 (Python) %o A217144 from itertools import accumulate, islice %o A217144 def A217144_gen(): # generator of terms %o A217144 yield 1 %o A217144 blist, b, c, f = (1,), 1, 1, 1 %o A217144 while True: %o A217144 blist = list(accumulate(blist, initial=(b:=blist[-1]))) %o A217144 yield (f:=-f)*(c := c+f*b**2) %o A217144 A217144_list = list(islice(A217144_gen(),20)) # _Chai Wah Wu_, Jun 22 2022 %Y A217144 Cf. A000110, A005001, A087650, A217143. %K A217144 nonn %O A217144 0,3 %A A217144 _Emanuele Munarini_, Sep 27 2012 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE