OFFSET
0,4
LINKS
Eric Weisstein's World of Mathematics, Boustrophedon Transform
Wikipedia, Boustrophedon transform
FORMULA
E.g.f.: (2/sqrt(5)) * exp(x/2) * sinh((sqrt(5)/2)*x) * cos(x) / (1 + sin(x)). [corrected by Vaclav Kotesovec, May 09 2024]
a(n) ~ (-1)^(n+1) * sinh(sqrt(5)*Pi/4) * 2^(n + 7/2) * n^(n + 1/2) / (sqrt(5) * Pi^(n + 1/2) * exp(n + Pi/4)). - Vaclav Kotesovec, May 09 2024
MATHEMATICA
nmax = 25; Round[CoefficientList[Series[2*E^(x/2)*Sinh[Sqrt[5]*x/2]*Cos[x] / (Sqrt[5]*(1 + Sin[x])), {x, 0, nmax}], x] * Range[0, nmax]!] (* Vaclav Kotesovec, May 09 2024 *)
PROG
(Python)
import sympy
def A338399(n):
T=[]
for k in range(n+1):
T.append(sympy.fibonacci(k))
T.reverse()
for i in range(k):
T[i+1]=T[i]-T[i+1]
return T[-1]
(Python)
from itertools import accumulate, islice
from operator import sub
def A338399_gen(): # generator of terms
blist, a, b = tuple(), 0, 1
while True:
yield (blist := tuple(accumulate(reversed(blist), func=sub, initial=a)))[-1]
a, b = b, a+b
CROSSREFS
KEYWORD
sign
AUTHOR
Pontus von Brömssen, Oct 24 2020
STATUS
approved