login
This site is supported by donations to The OEIS Foundation.

 

Logo


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

%I

%S 2,3,4,8,9,10,14,15,16,20,21,22,26,27,28,32,33,34,38,39,40,44,45,46,

%T 50,51,52,56,57,58,62,63,64,68,69,70,74,75,76,80,81,82,86,87,88,92,93,

%U 94,98,99,100,104,105,106,110,111,112,116,117,118,122,123,124

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

%H Vincenzo Librandi, <a href="/A047228/b047228.txt">Table of n, a(n) for n = 1..1000</a>

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

%F From _Paul Barry_, Sep 01 2009: (Start)

%F G.f.: (2+x+x^2+2*x^3)/(1-x-x^3+x^4).

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

%F From _Wesley Ivan Hurt_, Jun 13 2016: (Start)

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

%F a(3k) = 6k-2, a(3k-1) = 6k-3, a(3k-2) = 6k-4. (End)

%p A047228:=n->2*n-1-cos(2*n*Pi/3)+sin(2*n*Pi/3)/sqrt(3): seq(A047228(n), n=1..100); # _Wesley Ivan Hurt_, Jun 13 2016

%t Select[Range[0, 150], MemberQ[{2, 3, 4}, Mod[#, 6]]&] (* _Vincenzo Librandi_, Jan 06 2013 *)

%o (MAGMA) [n: n in [0..120] | n mod 6 in [2..4]]; // _Vincenzo Librandi_, Jan 05 2013

%o (Haskell)

%o a047228 n = a047228_list !! (n-1)

%o a047228_list = 2 : 3 : 4 : map (+ 6) a047228_list

%o -- _Reinhard Zumkeller_, Feb 19 2013

%Y Cf. A007310, A047241, A047261, A047273, A097451.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

%E Paul Barry formula adapted for offset 1 by _Wesley Ivan Hurt_, Jun 13 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 23:51 EDT 2019. Contains 328379 sequences. (Running on oeis4.)