A155944 Jacobsthal numbers A001045, every second term incremented by 1.
0, 2, 1, 4, 5, 12, 21, 44, 85, 172, 341, 684, 1365, 2732, 5461, 10924, 21845, 43692, 87381, 174764, 349525, 699052, 1398101, 2796204, 5592405, 11184812, 22369621, 44739244, 89478485, 178956972, 357913941, 715827884, 1431655765, 2863311532, 5726623061, 11453246124, 22906492245
Offset: 0
Links
- Guo-Niu Han, Hankel continued fraction and its applications, Advances in Mathematics, Elsevier, 2016, 303, pp.295-321. 10.1016/j.aim.2016.08.013. hal-02125293.
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
Programs
-
Mathematica
LinearRecurrence[{2,1,-2},{0,2,1},40] (* Harvey P. Dale, Mar 14 2014 *)
-
Python
print([(2**n + 1)//3 + n%2 for n in range(40)]) # Karl V. Keller, Jr., Aug 15 2021
Formula
a(n+1) = 2^n + 1 - a(n).
From R. J. Mathar, Feb 10 2009: (Start)
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n) = 1/2 + 2^n/3 - 5*(-1)^n/6.
G.f.: x(2-3x)/((1+x)(1-x)(1-2x)). (End)
a(n) = floor((2^n + 1)/3) + n mod 2. - Karl V. Keller, Jr., Aug 15 2021
Extensions
Definition rephrased, more terms from R. J. Mathar, Feb 10 2009
Comments