OFFSET
0,4
LINKS
Eric Weisstein's World of Mathematics, Boustrophedon Transform
Wikipedia, Boustrophedon transform
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]
CROSSREFS
KEYWORD
sign
AUTHOR
Pontus von Brömssen, Oct 24 2020
STATUS
approved