login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338400
Inverse boustrophedon transform of the partition numbers.
1
1, 0, 1, -2, 2, -19, 39, -257, 1113, -6829, 42399, -299550, 2281531, -18901042, 168402645, -1608304966, 16381456532, -177291076953, 2031597803009, -24573784682206, 312883002507064, -4182938253898882, 58584703430964506, -857812167322107132, 13106404407407087063
OFFSET
0,4
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A000111(n-k) * A000041(k).
PROG
(Python)
import sympy
def A338400(n):
T=[]
for k in range(n+1):
T.append(sympy.npartitions(k))
T.reverse()
for i in range(k):
T[i+1]=T[i]-T[i+1]
return T[-1]
(Python)
from itertools import islice, count, accumulate
from operator import sub
from sympy import npartitions
def A338400_gen(): # generator of terms
blist = tuple()
for i in count(0):
yield (blist := tuple(accumulate(reversed(blist), func=sub, initial=npartitions(i))))[-1]
A338400_list = list(islice(A338400_gen(), 20)) # Chai Wah Wu, Jun 10 2022
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved