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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047212 Numbers that are congruent to {0, 2, 4} mod 5. 28
0, 2, 4, 5, 7, 9, 10, 12, 14, 15, 17, 19, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 37, 39, 40, 42, 44, 45, 47, 49, 50, 52, 54, 55, 57, 59, 60, 62, 64, 65, 67, 69, 70, 72, 74, 75, 77, 79, 80, 82, 84, 85, 87, 89, 90, 92, 94, 95, 97, 99, 100, 102, 104, 105, 107 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).

FORMULA

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

G.f.: x^2*(2+2*x+x^2)/((1-x)^2*(1+x+x^2)). - Bruno Berselli, Mar 31 2011

a(n) = floor((5*n-3)/3). [Gary Detlefs, May 14 2011]

a(n) = n + ceiling(2*(n-1)/3) - 1. - Arkadiusz Wesolowski, Sep 18 2012

From Wesley Ivan Hurt, Jun 14 2016: (Start)

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

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

MAPLE

A047212:=n->floor((5*n-3)/3); seq(A047212(n), n=1..100); # Wesley Ivan Hurt, Nov 25 2013

MATHEMATICA

Select[Range[0, 200], MemberQ[{0, 2, 4}, Mod[#, 5]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)

PROG

(MAGMA) [n : n in [0..140] | n mod 5 in [0, 2, 4]]; // Vincenzo Librandi, Mar 31 2011

(MAGMA) &cat[[n, n+2, n+4]: n in [0..90 by 5]]; // Bruno Berselli, Mar 31 2011

(PARI) a(n)=n\3*5+[-1, 0, 2][n%3+1] \\ Charles R Greathouse IV, Mar 29 2012

CROSSREFS

Cf. A047209, A047211.

Sequence in context: A184656 A286989 A226720 * A121347 A106829 A190228

Adjacent sequences:  A047209 A047210 A047211 * A047213 A047214 A047215

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified May 24 09:32 EDT 2017. Contains 286963 sequences.