%I #37 Dec 30 2023 23:44:21
%S 1,3,4,7,9,10,13,15,16,19,21,22,25,27,28,31,33,34,37,39,40,43,45,46,
%T 49,51,52,55,57,58,61,63,64,67,69,70,73,75,76,79,81,82,85,87,88,91,93,
%U 94,97,99,100,103,105,106,109,111,112,115,117,118,121,123,124
%N Numbers that are congruent to {1, 3, 4} mod 6.
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/sequenc.htm#seq666">More palindromic products of integer sequences: Three consecutive palindromes</a>.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F G.f.: x*(2*x+1)*(x^2+1)/((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Aug 24 2011
%F From _Wesley Ivan Hurt_, Jun 11 2016: (Start)
%F a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4.
%F a(n) = 2*(3*n - 2 - cos(2*n*Pi/3))/3.
%F a(3k) = 6k-2, a(3k-1) = 6k-3, a(3k-2) = 6k-5. (End)
%F Sum_{n>=1} (-1)^(n+1)/a(n) = (3+2*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) - log(2)/6. - _Amiram Eldar_, Dec 16 2021
%p A029739:=n->2*(3*n-2-cos(2*n*Pi/3))/3: seq(A029739(n), n=1..100); # _Wesley Ivan Hurt_, Jun 11 2016
%t Select[Range[0, 202], MemberQ[{1, 3, 4}, Mod[#, 6]] &] (* and *) Join[{1}, Accumulate[Total /@ CellularAutomaton[65, {1, 1, 0, 0, 1, 0}, 100]]] (* _Vladimir Joseph Stephan Orlovsky_, Feb 11 2012 *)
%t LinearRecurrence[{1,0,1,-1},{1,3,4,7},80] (* _Harvey P. Dale_, Aug 21 2021 *)
%o (Magma) [n : n in [0..150] | n mod 6 in {1, 3, 4}]; // _Vincenzo Librandi_, Dec 29 2010
%K nonn,easy
%O 1,2
%A _Patrick De Geest_