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!)
A047202 Numbers that are congruent to {2, 3, 4} mod 5. 34

%I #44 Apr 16 2023 03:16:53

%S 2,3,4,7,8,9,12,13,14,17,18,19,22,23,24,27,28,29,32,33,34,37,38,39,42,

%T 43,44,47,48,49,52,53,54,57,58,59,62,63,64,67,68,69,72,73,74,77,78,79,

%U 82,83,84,87,88,89,92,93,94,97,98,99,102,103,104,107,108

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

%H Stefano Spezia, <a href="/A047202/b047202.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 (1,0,1,-1).

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

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

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

%F a(n) = (15*n-3-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.

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

%F a(n) = 2*n - floor((n-1)/3) - ((n-1) mod 3). - _Wesley Ivan Hurt_, Sep 26 2017

%F Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt((5+sqrt(5))/10)*Pi/5 + log(phi)/sqrt(5) - 3*log(2)/5, where phi is the golden ratio (A001622). - _Amiram Eldar_, Apr 16 2023

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

%t Select[Range[0, 200], MemberQ[{2, 3, 4}, Mod[#, 5]] &] (* _Vladimir Joseph Stephan Orlovsky_, Feb 12 2012 *)

%o (Magma) [n: n in [1..150] | n mod 5 in [2..4]]; // _Vincenzo Librandi_, Mar 31 2011

%o (PARI) a(n)=n\3*5+[-1,2,3][n%3+1] \\ _Charles R Greathouse IV_, Dec 22 2011

%Y Cf. A001622.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

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 25 16:42 EDT 2024. Contains 371989 sequences. (Running on oeis4.)