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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047223 Numbers that are congruent to {1, 2, 3} mod 5. 21
1, 2, 3, 6, 7, 8, 11, 12, 13, 16, 17, 18, 21, 22, 23, 26, 27, 28, 31, 32, 33, 36, 37, 38, 41, 42, 43, 46, 47, 48, 51, 52, 53, 56, 57, 58, 61, 62, 63, 66, 67, 68, 71, 72, 73, 76, 77, 78, 81, 82, 83, 86, 87, 88, 91, 92, 93, 96, 97, 98, 101, 102, 103, 106, 107 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

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

FORMULA

G.f.: x*(1+x+x^2+2*x^3)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011

a(n) = 2*floor((n-1)/3)+n. - Gary Detlefs, Dec 22 2011

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

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

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

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

MAPLE

A047223:=n->(15*n-12-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047223(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016

MATHEMATICA

Select[Range[100], MemberQ[{1, 2, 3}, Mod[#, 5]]&] (* Harvey P. Dale, Oct 28 2013 *)

LinearRecurrence[{1, 0, 1, -1}, {1, 2, 3, 6}, 100] (* Vincenzo Librandi, Jun 15 2016 *)

PROG

(PARI) a(n)=(n-1)\3*5+n%5 \\ Charles R Greathouse IV, Dec 22 2011

(MAGMA) [n : n in [0..150] | n mod 5 in [1..3]]; // Wesley Ivan Hurt, Jun 14 2016

CROSSREFS

Sequence in context: A015841 A175893 A031470 * A004435 A008321 A064472

Adjacent sequences:  A047220 A047221 A047222 * A047224 A047225 A047226

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 13 04:20 EST 2019. Contains 329085 sequences. (Running on oeis4.)