login
Start at a(0)=1. a(n) = a(n-1)+2 if n == 1,2 (mod 3) and a(n)=a(n-1)+a(n-3) if n == 0 (mod 3).
0

%I #21 May 31 2016 03:57:13

%S 1,3,5,6,8,10,16,18,20,36,38,40,76,78,80,156,158,160,316,318,320,636,

%T 638,640,1276,1278,1280,2556,2558,2560,5116,5118,5120,10236,10238,

%U 10240,20476,20478,20480,40956,40958

%N Start at a(0)=1. a(n) = a(n-1)+2 if n == 1,2 (mod 3) and a(n)=a(n-1)+a(n-3) if n == 0 (mod 3).

%C See Mathematica section for an explicit formula for the n-th term. - _Benedict W. J. Irwin_, May 30 2016

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

%F G.f.: ( 1+3*x+5*x^2+3*x^3-x^4-5*x^5 ) / ( (x-1)*(2*x^3-1)*(1+x+x^2) ). - _R. J. Mathar_, Apr 16 2016

%F a(3n) = A048487(n). a(3n+1) = A131051(n+1). a(3n+2)=A020714(n). - _R. J. Mathar_, Apr 16 2016

%t Simplify[Table[1/6 (10 (2^n)^(1/3) + 4 (-3 + 5 2^(n/3)) Cos[(2 n Pi)/3] + 5 2^((4 + n)/3)Sin[(n Pi)/3] (Sqrt[3] (-1 + 2^(1/3)) Cos[(n Pi)/3] + (1 + 2^(1/3)) Sin[(n Pi)/3]) - 4 (3 + Sqrt[3] Sin[(2 n Pi)/3])), {n, 0, 20}]] (* _Benedict W. J. Irwin_, May 30 2016 *)

%K nonn,easy,less

%O 0,2

%A _Ravesh Sukhram_, Feb 27 2016