login
List the nonnegative integers where multiples of 6 occur twice and numbers of the form 6k+4 are omitted.
3

%I #21 Apr 04 2023 07:44:00

%S 0,0,1,2,3,5,6,6,7,8,9,11,12,12,13,14,15,17,18,18,19,20,21,23,24,24,

%T 25,26,27,29,30,30,31,32,33,35,36,36,37,38,39,41,42,42,43,44,45,47,48,

%U 48,49,50,51,53,54,54,55,56,57,59,60,60,61,62,63,65,66,66

%N List the nonnegative integers where multiples of 6 occur twice and numbers of the form 6k+4 are omitted.

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

%F a(n) = a(n-6) + 6, for n >= 6.

%F a(n) = cos(2*Pi*n/3)/6-sqrt(3)*sin(2*Pi*n/3)/6+cos(Pi*n/3)/2-sqrt(3)*sin(Pi*n/3)/6+(3n-2)/3.

%F G.f.: x^2*(x^3+x^2+1) / ((x-1)^2*(x^2-x+1)*(x^2+x+1)). - _Colin Barker_, Jun 27 2013

%F Sum_{n>=2} (-1)^n/a(n) = 5*Pi/(12*sqrt(3)) - log(3)/4 + log(2)/3. - _Amiram Eldar_, Apr 04 2023

%t fix[n_]:=Which[Divisible[n,6],{n,n},Mod[n,6]==4,{},True,n]; Flatten[ fix/@ Range[0,70]] (* _Harvey P. Dale_, Aug 21 2014 *)

%K easy,nonn

%O 0,4

%A _Paul Barry_, Feb 13 2007