OFFSET
0,5
COMMENTS
This construction combines the 2 basic sequences which equal their first differences in the same way as A138635 does for sequences which equal their 3rd differences and A137171 does for sequences which equal their fourth differences.
Dropping a(0), this is the inverse binomial transform of A024537. - R. J. Mathar, Apr 08 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2).
FORMULA
a(2n) + a(2n+1) = A000079(n).
G.f.: x*(1+x-x^2)/(1-2*x^2). - R. J. Mathar, Apr 08 2009
a(n) = (1/2)*(2^floor(n/2) + [n=1] - [n=0]). - G. C. Greubel, Apr 19 2023
E.g.f.: (2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x) + 2*x - 2)/4. - Stefano Spezia, May 13 2023
MATHEMATICA
Table[(2^Floor[n/2] +Boole[n==1] -Boole[n==0])/2, {n, 0, 50}] (* or *) LinearRecurrence[{0, 2}, {0, 1, 1, 1}, 51] (* G. C. Greubel, Apr 19 2023 *)
PROG
(PARI) a(n)=if(n>3, ([0, 1; 2, 0]^n*[1; 1])[1, 1]/2, n>0) \\ Charles R Greathouse IV, Oct 18 2022
(Magma) [0, 1] cat [2^Floor((n-2)/2): n in [2..50]]; // G. C. Greubel, Apr 19 2023
(SageMath)
def A158780(n): return (2^(n//2) + int(n==1) - int(n==0))/2
[A158780(n) for n in range(51)] # G. C. Greubel, Apr 19 2023
CROSSREFS
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 26 2009
EXTENSIONS
Edited by R. J. Mathar, Apr 08 2009
STATUS
approved