login
A390532
Sequences A001477 and A000079 interlaced.
1
0, 1, 1, 2, 2, 4, 3, 8, 4, 16, 5, 32, 6, 64, 7, 128, 8, 256, 9, 512, 10, 1024, 11, 2048, 12, 4096, 13, 8192, 14, 16384, 15, 32768, 16, 65536, 17, 131072, 18, 262144, 19, 524288, 20, 1048576, 21, 2097152, 22, 4194304, 23, 8388608, 24, 16777216, 25, 33554432, 26, 67108864, 27
OFFSET
0,4
REFERENCES
Konrad Knopp, Theory and application of infinite series, Blackie & Son Limited, London and Glasgow, 1954. See p. 67.
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