

A029579


a(2*n) = n+1, a(2*n1) = 2*n1.


3



1, 1, 2, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


LINKS

Muniru A Asiru, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,1).


FORMULA

G.f.: (1 + x + x^3)/(1  x^2)^2.
From Paul Barry, Aug 29 2004: (Start)
a(n) = (3*n + 2)/4 + (2  n)*(1)^n/4.
a(n) = 2*a(n2)  a(n4).
Binomial transform is A098156. (End)
From Gary W. Adamson, May 08 2010: (Start)
Let M = an infinite lower triangular matrix with (1, 1, 0, 1, 0, 0, 0, ...) in every column; for columns > 0, shifted down twice from the previous column.
Then A029579 = M * [1, 2, 3, 0, 0, 0, ...]. (End)
From Paul Curtz, Sep 21 2018: (Start)
a(n) = A174239(n).
Terms of A026741(n+1) swapped in pairs. (End)


MAPLE

seq(coeff(series((1+x+x^3)/(1x^2)^2, x, n+1), x, n), n = 0 .. 80); # Muniru A Asiru, Sep 21 2018


MATHEMATICA

With[{nn = 50}, Riffle[Range[nn], Range[1, 2 nn + 1, 2]]] (* or *) LinearRecurrence[{0, 2, 0, 1}, {1, 1, 2, 3}, 120] (* Harvey P. Dale, Apr 22 2018 *)


PROG

(Haskell)
import Data.List (transpose)
a029579 n = if m == 0 then n' + 1 else n where (n', m) = divMod n 2
a029579_list = concat $ transpose [[1 ..], [1, 3 ..]]
 Reinhard Zumkeller, Apr 06 2015
(PARI) a(n)=(3*n+2+(2n)*(1)^n)/4 \\ Charles R Greathouse IV, Sep 02 2015
(GAP) a:=[1, 1, 2, 3];; for n in [5..80] do a[n]:=2*a[n2]a[n4]; od; a; # Muniru A Asiru, Sep 21 2018


CROSSREFS

Cf. A026741, A174239.
Sequence in context: A062854 A057859 A242992 * A106647 A130157 A265018
Adjacent sequences: A029576 A029577 A029578 * A029580 A029581 A029582


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


EXTENSIONS

Title simplified by Sean A. Irvine, Feb 29 2020


STATUS

approved



