OFFSET
0,4
REFERENCES
Konrad Knopp, Theory and application of infinite series, Blackie & Son Limited, London and Glasgow, 1954. See p. 67.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,4,0,-5,0,2).
FORMULA
a(n) = n*(1 - (n mod 2))/2 + 2^((n-1)/2)*(n mod 2).
a(n) = n/2 + (2^((n-1)/2) - n/2)*(n mod 2).
a(n) = 4*a(n-2) - 5*a(n-4) + 2*a(n-6) for n > 5.
G.f.: x*(1 + x - 2*x^2 - 2*x^3 + x^4)/((1 - x^2)^2*(1 - 2*x^2)).
E.g.f.: (x*sinh(x) + sqrt(2)*sinh(sqrt(2)*x))/2.
a(n) = A138219(n)/2.
a(n) = 2^m if n is odd and a(n) = floor(n/2) otherwise. - Chai Wah Wu, Jan 05 2026
MATHEMATICA
a[n_]:=n/2+(2^((n-1)/2)-n/2)Mod[n, 2]; Array[a, 55, 0]
PROG
(Python)
def A390532(n): return 1<<(n>>1) if n&1 else n>>1 # Chai Wah Wu, Jan 05 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Jan 04 2026
STATUS
approved
