login
If n is a multiple of 3, then a(n) = 0, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 2*k + 3.
3

%I #11 Jul 28 2022 09:05:44

%S 0,3,3,0,5,5,0,7,7,0,9,9,0,11,11,0,13,13,0,15,15,0,17,17,0,19,19,0,21,

%T 21,0,23,23,0,25,25,0,27,27,0,29,29,0,31,31,0,33,33,0,35,35,0,37,37,0,

%U 39,39,0,41,41,0,43,43,0,45,45,0,47,47,0,49,49,0,51,51,0,53,53,0,55,55,0,57,57,0,59,59,0

%N If n is a multiple of 3, then a(n) = 0, and if n is of the form 3k+r, with r = 1 or 2, then a(n) = 2*k + 3.

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

%F a(n) = A353314(n) - n.

%F a(n) = A102899(3+n).

%F From _Chai Wah Wu_, Jul 27 2022: (Start)

%F a(n) = 2*a(n-3) - a(n-6) for n > 5.

%F G.f.: x*(-x^4 - x^3 + 3*x + 3)/(x^6 - 2*x^3 + 1). (End)

%o (PARI) A353327(n) = { my(r=(n%3)); if(!r,0,((2*((n-r)/3)) + 3)); };

%Y Cf. A010872, A102899, A120691, A353314.

%K nonn,easy,less

%O 0,2

%A _Antti Karttunen_, Apr 14 2022