login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047245 Numbers that are congruent to {1, 2, 3} mod 6. 4
1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 25, 26, 27, 31, 32, 33, 37, 38, 39, 43, 44, 45, 49, 50, 51, 55, 56, 57, 61, 62, 63, 67, 68, 69, 73, 74, 75, 79, 80, 81, 85, 86, 87, 91, 92, 93, 97, 98, 99, 103, 104, 105, 109, 110, 111, 115, 116, 117, 121, 122, 123 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..63.

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

FORMULA

From Johannes W. Meijer, Jun 07 2011: (Start)

a(n) = ceiling(n/3) + ceiling((n-1)/3) + ceiling((n-2)/3) + 3*ceiling((n-3)/3).

G.f.: x*(1+x+x^2+3*x^3)/((x-1)^2*(x^2+x+1)). (End)

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

From Wesley Ivan Hurt, Apr 13 2015: (Start)

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

a(n) = 2*n-3 + ((2*n-3) mod 3). (End)

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

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

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

MAPLE

A047245:=n->2*n-3+((2*n-3) mod 3): seq(A047245(n), n=1..100); # Wesley Ivan Hurt, Apr 13 2015

MATHEMATICA

Select[Range[0, 200], Mod[#, 6] == 1 || Mod[#, 6] == 2 || Mod[#, 6] == 3 &] (* Vladimir Joseph Stephan Orlovsky, Jul 07 2011 *)

Flatten[Table[{6n + 1, 6n + 2, 6n + 3}, {n, 0, 19}]] (* Alonso del Arte, Jul 07 2011 *)

Select[Range[0, 200], MemberQ[{1, 2, 3}, Mod[#, 6]] &] (* Vincenzo Librandi, Apr 14 2015 *)

PROG

(MAGMA) [2*n-3+((2*n-3) mod 3) : n in [1..100]]; // Wesley Ivan Hurt, Apr 13 2015

CROSSREFS

Cf. A047240, A047244, A047258 (complement).

Sequence in context: A327224 A231624 A194381 * A070752 A039582 A026310

Adjacent sequences:  A047242 A047243 A047244 * A047246 A047247 A047248

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 August 5 18:00 EDT 2021. Contains 346488 sequences. (Running on oeis4.)