login
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
OFFSET
1,2
COMMENTS
a(k)^m is a term iff {a(k) is odd and m is a nonnegative integer} or {m is in A004273}. - Jerzy R Borysowicz, May 08 2023
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)
Sum_{n>=1} (-1)^(n+1)/a(n) = (9-2*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) - log(2)/6. - Amiram Eldar, Dec 14 2021
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
(PARI) a(n) = 3*floor((n-1)/3) + n; \\ David Lovler, Aug 03 2022
CROSSREFS
Cf. A047240, A047244, A047258 (complement).
Sequence in context: A327224 A231624 A194381 * A070752 A039582 A026310
KEYWORD
nonn,easy
STATUS
approved