login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278907 a(n) = floor((n*2^(n+1)+2)/(2*n-(-1)^n+3)) - floor((n*2^(n+1)-2)/(2*n-(-1)^n+3)). 1

%I #23 Sep 08 2022 08:46:18

%S 2,1,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,0,0,

%T 0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,

%U 0,1,1,1,1,0,0,0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1

%N a(n) = floor((n*2^(n+1)+2)/(2*n-(-1)^n+3)) - floor((n*2^(n+1)-2)/(2*n-(-1)^n+3)).

%C If a(n) = b(n) - c(n), then

%C 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 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, ...

%H G. C. Greubel, <a href="/A278907/b278907.txt">Table of n, a(n) for n = 0..1000</a>

%e a(0) = b(0) - c(0) = 1 - (-1) = 2,

%e a(1) = b(1) - c(1) = 1 - 0 = 1,

%e a(2) = b(2) - c(2) = 3 - 2 = 1.

%t 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 *)

%o (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]];

%o (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

%Y Cf. A002064 (Cullen numbers).

%K nonn,less

%O 0,1

%A _Juri-Stepan Gerasimov_, Nov 30 2016

%E Definition corrected by _R. J. Mathar_, Dec 02 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)