OFFSET
0,1
COMMENTS
If a(n) = b(n) - c(n), then
b(n) = 1, 1, 3, 5, 13, 23, 55, 99, 227, 419, 931, 1733, 3781, 7099, 15291, 28913, 61681, 117275, 248347, 474355, 998643, 1914791, 4011943, 7717519, 16106127, 31068918, 64623350, 124961333, 259179061, 502234079, 1039104991, ...
c(n) = -1, 0, 2, 4, 12, 22, 54, 99, 227, 418, 930, 1732, 3780, 7099, 15291, 28912, 61680, 117274, 248346, 474355, 998643, 1914790, 4011942, 7717519, 16106127, 31068918, 64623350, 124961332, 259179060, 502234078, 1039104990, ...
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
EXAMPLE
a(0) = b(0) - c(0) = 1 - (-1) = 2,
a(1) = b(1) - c(1) = 1 - 0 = 1,
a(2) = b(2) - c(2) = 3 - 2 = 1.
MATHEMATICA
a[n_] := Floor[(n*2^(n + 1) + 2)/(2*n - (-1)^n + 3)] - Floor[(n*2^(n + 1) - 2)/(2*n - (-1)^n + 3)]; Table[a[n], {n, 1, 50}] (* G. C. Greubel, Apr 20 2017 *)
PROG
(Magma) [((n*2^(n+1)+2) div (2*n-(-1)^n+3))-((n*2^(n+1)-2) div (2*n-(-1)^n+3)): n in [0..100]];
(PARI) for(n=0, 50, print1(floor((n*2^(n+1)+2)/(2*n-(-1)^n+3)) - floor((n*2^(n+1)-2)/(2*n-(-1)^n+3)), ", ")) \\ G. C. Greubel, Apr 20 2017
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Juri-Stepan Gerasimov, Nov 30 2016
EXTENSIONS
Definition corrected by R. J. Mathar, Dec 02 2016
STATUS
approved