%I #47 Aug 26 2022 08:40:11
%S 3,5,9,11,15,17,21,23,27,29,33,35,39,41,45,47,51,53,57,59,63,65,69,71,
%T 75,77,81,83,87,89,93,95,99,101,105,107,111,113,117,119,123,125,129,
%U 131,135,137,141,143,147,149
%N Numbers that are congruent to {3, 5} mod 6.
%C Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0( 10 ).
%C This sequence is an interleaving of A016945 with A016969. - _Guenther Schrack_, Nov 16 2018
%H Bruno Berselli, <a href="/A047270/b047270.txt">Table of n, a(n) for n = 1..10000</a> (From _Bruno Berselli_, Jun 24 2010)
%H William A. Stein, <a href="http://wstein.org/Tables/dimskg0n.gp">Dimensions of the spaces S_k(Gamma_0(N))</a>.
%H William A. Stein, <a href="http://wstein.org/Tables/">The modular forms database</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = sqrt(2)*sqrt((1-6*n)*(-1)^n + 18*n^2 - 6*n + 1)/2. - _Paul Barry_, May 11 2003
%F From _Bruno Berselli_, Jun 24 2010: (Start)
%F G.f.: (3+2*x+x^2)/((1+x)*(1-x)^2).
%F a(n) - a(n-1) - a(n-2) + a(n-3) = 0, with n > 3.
%F a(n) = (6*n - (-1)^n - 1)/2. (End)
%F a(n) = 6*n - a(n-1) - 4 with n > 1, a(1)=3. - _Vincenzo Librandi_, Aug 05 2010
%F From _Guenther Schrack_, Nov 17 2018: (Start)
%F a(n) = a(n-2) + 6 for n > 2.
%F a(-n) = -A047241(n+1) for n > 0.
%F a(n) = A109613(n-1) + 2*n for n > 0.
%F a(n) = 2*A001651(n) + 1.
%F m-element moving averages: Sum_{k=1..m} a(n-m+k)/m = A016777(n-m/2) for m = 2, 4, 6, ... and n >= m. (End)
%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) - log(3)/4. - _Amiram Eldar_, Dec 13 2021
%F E.g.f.: 1 + 3*x*exp(x) - cosh(x). - _David Lovler_, Aug 25 2022
%t Select[Range@ 149, MemberQ[{3, 5}, Mod[#, 6]] &] (* or *)
%t Array[(6 # - (-1)^# - 1)/2 &, 50] (* or *)
%t Fold[Append[#1, 6 #2 - Last@ #1 - 4] &, {3}, Range[2, 50]] (* or *)
%t CoefficientList[Series[(3 + 2 x + x^2)/((1 + x) (1 - x)^2), {x, 0, 49}], x] (* _Michael De Vlieger_, Jan 12 2018 *)
%o (PARI) a(n) = (6*n - 1 - (-1)^n)/2 \\ _David Lovler_, Aug 25 2022
%Y Cf. A047235 [(6*n-(-1)^n-3)/2], A047241 [(6*n-(-1)^n-5)/2], A047238 [(6*n-(-1)^n-7)/2]. [_Bruno Berselli_, Jun 24 2010]
%Y Subsequence of A186422.
%Y From _Guenther Schrack_, Nov 18 2018: (Start)
%Y Complement: A047237.
%Y First differences: A105397(n) for n > 0.
%Y Partial sums: A227017(n+1) for n > 0.
%Y Elements of odd index: A016945.
%Y Elements of even index: A016969(n-1) for n > 0. (End)
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_