OFFSET
-1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = -1..10000
FORMULA
From R. J. Mathar, Aug 22 2008: (Start)
O.g.f.: 2/x+x^3(3-2x)/((1-x)^2*(1+x)(1+x^2)).
a(n) = 3/8 -5*(-1)^n/8 + n/4 + (1/4)*cos(Pi*n/2) - (5/4)*sin(Pi*n/2), n > -1. (End)
EXAMPLE
The sum of 4 successive terms gives n for n > 2:
n = 2 = a(-1) + a(0) + a(1) + a(2) = 2 + 0 + 0 + 0.
n = 3 = a(3) = a(0) + a(1) + a(2) + a(3) = 0 + 0 + 0 + 3.
n = 4 = a(1) + a(2) + a(3) + a(4) = 0 + 0 + 3 + 1.
The value of a(-1) = 2 is arbitrary but provides a suitable extension.
MATHEMATICA
f[x_] := f[x] = x-f[x-1]-f[x-2]-f[x-3]; {f[-1]=2, f[0]=0, f[1]=0, f[2]=0}; Table[f[w], {w, -1, 25}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 28 2003
EXTENSIONS
More terms from Amiram Eldar, Mar 16 2025
STATUS
approved
