login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047246 Numbers that are congruent to {0, 1, 2, 3} mod 6. 7

%I #41 Sep 08 2022 08:44:56

%S 0,1,2,3,6,7,8,9,12,13,14,15,18,19,20,21,24,25,26,27,30,31,32,33,36,

%T 37,38,39,42,43,44,45,48,49,50,51,54,55,56,57,60,61,62,63,66,67,68,69,

%U 72,73,74,75,78,79,80,81,84,85,86,87,90,91,92,93,96,97,98

%N Numbers that are congruent to {0, 1, 2, 3} mod 6.

%C The sequence is the interleaving of A047238 with A047241. - _Guenther Schrack_, Feb 12 2019

%H Reinhard Zumkeller, <a href="/A047246/b047246.txt">Table of n, a(n) for n = 1..1000</a>

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

%F G.f.: x^2*(1+x+x^2+3*x^3) / ((1+x)*(1-x)^2*(1+x^2)). - _R. J. Mathar_, Oct 08 2011

%F a(n) = floor((6/5)*floor(5*(n-1)/4)). - _Bruno Berselli_, May 03 2016

%F From _Wesley Ivan Hurt_, May 21 2016: (Start)

%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.

%F a(n) = (6*n - 9 - i^(2*n) - (1-i)*i^(-n) - (1+i)*i^n)/4 where i=sqrt(-1).

%F a(2*n) = A047241(n), a(2*n-1) = A047238(n). (End)

%F E.g.f.: (6 + sin(x) - cos(x) + (3*x - 4)*sinh(x) + (3*x - 5)*cosh(x))/2. - _Ilya Gutkovskiy_, May 21 2016

%F From _Guenther Schrack_, Feb 12 2019: (Start)

%F a(n) = (6*n - 9 - (-1)^n - 2*(-1)^(n*(n+1)/2))/4.

%F a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=3, for n > 4. (End)

%F Sum_{n>=2} (-1)^n/a(n) = Pi/(6*sqrt(3)) + 2*log(2)/3. - _Amiram Eldar_, Dec 16 2021

%p A047246:=n->(6*n-9-I^(2*n)-(1-I)*I^(-n)-(1+I)*I^n)/4: seq(A047246(n), n=1..100); # _Wesley Ivan Hurt_, May 21 2016

%t Table[(6n-9-I^(2n)-(1-I)*I^(-n)-(1+I)*I^n)/4, {n, 80}] (* _Wesley Ivan Hurt_, May 21 2016 *)

%o (Haskell)

%o a047246 n = a047246_list !! (n-1)

%o a047246_list = [0..3] ++ map (+ 6) a047246_list

%o -- _Reinhard Zumkeller_, Jan 15 2013

%o (Magma) [Floor((6/5)*Floor(5*(n-1)/4)) : n in [1..100]]; // _Wesley Ivan Hurt_, May 21 2016

%o (PARI) my(x='x+O('x^70)); concat([0], Vec(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4)))) \\ _G. C. Greubel_, Feb 16 2019

%o (Sage) a=(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Feb 16 2019

%o (GAP) Filtered([0..100],n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 3); # _Muniru A Asiru_, Feb 20 2019

%Y Cf. A045331 (primes congruent to {1,2,3} mod 6), A047238, A047241.

%Y Complement: A047257.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_

%E More terms from _Wesley Ivan Hurt_, May 21 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)