login
a(2t) = a(2t-1) + 1, a(2t+1) = a(2t) + a(2t-2) for t >= 1, with a(0) = a(1) = 1.
3

%I #29 Feb 13 2018 04:02:24

%S 1,1,2,3,4,6,7,11,12,19,20,32,33,53,54,87,88,142,143,231,232,375,376,

%T 608,609,985,986,1595,1596,2582,2583,4179,4180,6763,6764,10944,10945,

%U 17709,17710,28655,28656,46366,46367,75023,75024,121391,121392,196416,196417

%N a(2t) = a(2t-1) + 1, a(2t+1) = a(2t) + a(2t-2) for t >= 1, with a(0) = a(1) = 1.

%H Reinhard Zumkeller, <a href="/A226538/b226538.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,0,0,-1).

%F a(2n) = A000071(n+3), a(2n+1) = A001911(n+1). - _Philippe Deléham_, Jun 18 2013

%F G.f.: (1+x+x^3)/((1-x)*(1+x)*(1-x^2-x^4)). - _Philippe Deléham_, Jun 18 2013

%F a(n) = a(n-1) + a(n-3)*(1-(-1)^n)/2 + (1+(-1)^n)/2. - _Paolo P. Lava_, Jun 27 2013

%p f:= proc(n) option remember;

%p if n <= 1 then 1

%p elif n mod 2 = 0 then f(n-1)+1

%p else f(n-1)+f(n-3)

%p fi

%p end:

%p t21:=[seq(f(n),n=0..60)];

%t LinearRecurrence[{0, 2, 0, 0, 0, -1}, {1, 1, 2, 3, 4, 6}, 50] (* _Jean-François Alcover_, Feb 13 2018 *)

%o (Haskell)

%o a226538 n = a226538_list !! n

%o a226538_list = concat $ transpose [drop 2 a000071_list, tail a001911_list]

%o -- _Reinhard Zumkeller_, Jun 18 2013

%K nonn,easy

%O 0,3

%A _V. T. Jayabalaji_, Jun 10 2013

%E Edited by _N. J. A. Sloane_, Jun 18 2013