Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #36 Sep 08 2022 08:44:56
%S 0,2,4,5,6,8,10,11,12,14,16,17,18,20,22,23,24,26,28,29,30,32,34,35,36,
%T 38,40,41,42,44,46,47,48,50,52,53,54,56,58,59,60,62,64,65,66,68,70,71,
%U 72,74,76,77,78,80,82,83,84,86,88,89,90,92,94,95,96,98
%N Numbers that are congruent to {0, 2, 4, 5} mod 6.
%C The sequence is the interleaving of A047233 with A016789(n-1). - _Guenther Schrack_, Feb 14 2019
%H G. C. Greubel, <a href="/A047262/b047262.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>.
%F From _R. J. Mathar_, Oct 08 2011: (Start)
%F G.f.: x^2*(2+x^2) / ( (1+x^2)*(1-x)^2 ).
%F a(n) = 3*n/2 - 1 - sin(Pi*n/2)/2. (End)
%F From _Wesley Ivan Hurt_, May 21 2016: (Start)
%F a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n > 4.
%F a(n) = (6*n - 4 - i^(1-n) + i^(1+n))/4, where i = sqrt(-1).
%F a(2*n) = A016789(n-1) for n>0, a(2*n-1) = A047233(n).
%F a(2-n) = - A047237(n), a(n-1) = A047273(n) - 1 for n > 1. (End)
%F From _Guenther Schrack_, Feb 14 2019: (Start)
%F a(n) = (6*n - 4 - (1 - (-1)^n)*(-1)^(n*(n-1)/2))/4.
%F a(n) = a(n-4) + 6, a(1)=0, a(2)=2, a(3)=4, a(4)=5, for n > 4. (End)
%F Sum_{n>=2} (-1)^n/a(n) = log(3)/4 + log(2)/3 - sqrt(3)*Pi/36. - _Amiram Eldar_, Dec 17 2021
%p A047262:=n->(6*n-4-I^(1-n)+I^(1+n))/4: seq(A047262(n), n=1..100); # _Wesley Ivan Hurt_, May 21 2016
%t Select[Range[0,100], MemberQ[{0,2,4,5}, Mod[#,6]]&] (* or *) LinearRecurrence[{2,-2,2,-1}, {0,2,4,5}, 70] (* _Harvey P. Dale_, Dec 09 2015 *)
%o (Magma) [n : n in [0..100] | n mod 6 in [0, 2, 4, 5]]; // _Wesley Ivan Hurt_, May 21 2016
%o (PARI) my(x='x+O('x^70)); concat([0], Vec(x^2*(2+x^2)/((1+x^2)*(1-x)^2))) \\ _G. C. Greubel_, Feb 16 2019
%o (Sage) a=(x^2*(2+x^2)/((1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Feb 16 2019
%Y Cf. A016789, A047233, A047237, A047273.
%Y Complement: A047241.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Wesley Ivan Hurt_, May 21 2016