login
1, 3 and the nonnegative even numbers.
0

%I #20 Oct 24 2023 23:15:19

%S 0,1,2,3,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,

%T 46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,

%U 92,94,96,98,100,102,104

%N 1, 3 and the nonnegative even numbers.

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

%F a(n) = 2*n - 4 + floor(3/n) + delta_{n,2}, n > 0. - _Wesley Ivan Hurt_, May 23 2013

%F a(n) = max(2n-4, n) = n + max(n-4,0). - _M. F. Hasler_, Oct 30 2019

%F From _Chai Wah Wu_, Feb 03 2021: (Start)

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

%F G.f.: (x^5 + x)/(x - 1)^2. (End)

%o (PARI) a(n)=n+if(n>4,n-4) \\ _M. F. Hasler_, Oct 30 2019

%K easy,nonn

%O 0,3

%A _N. J. A. Sloane_