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”).

A338399
Inverse boustrophedon transform of the Fibonacci numbers.
1
0, 1, -1, 2, -7, 15, -78, 293, -1629, 8992, -58105, 404669, -3097456, 25617669, -228373197, 2180640110, -22212371403, 240392198791, -2754699284494, 33320193986081, -424246016043385, 5671750867032228, -79436475109286061, 1163129092965592997
OFFSET
0,4
FORMULA
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A000111(n-k) * A000045(k).
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
A338399_list = list(islice(A338399_gen(), 20)) # Chai Wah Wu, Jun 10 2022
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved