login
A047242
Numbers that are congruent to {0, 1, 3} mod 6.
7
0, 1, 3, 6, 7, 9, 12, 13, 15, 18, 19, 21, 24, 25, 27, 30, 31, 33, 36, 37, 39, 42, 43, 45, 48, 49, 51, 54, 55, 57, 60, 61, 63, 66, 67, 69, 72, 73, 75, 78, 79, 81, 84, 85, 87, 90, 91, 93, 96, 97, 99, 102, 103, 105, 108, 109, 111, 114, 115, 117, 120, 121, 123
OFFSET
1,3
FORMULA
Equals partial sums of (0, 1, 2, 3, 1, 2, 3, 1, 2, 3, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x+3*x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
A214090(a(n)) = 0. - Reinhard Zumkeller, Jul 06 2012
a(n) = a(n-1) + a(n-3) - a(n-4), n>4. - Wesley Ivan Hurt, Dec 03 2014
a(n) = n-1 + floor((n-1)/3) + floor((2n-2)/3). - Wesley Ivan Hurt, Dec 03 2014
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = (6*n-8-cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/3.
a(3k) = 6k-3, a(3k-1) = 6k-5, a(3k-2) = 6k-6. (End)
a(n) = 2*n - 2 - sign((n-1) mod 3). - Wesley Ivan Hurt, Sep 26 2017
Sum_{n>=2} (-1)^n/a(n) = Pi/12 + log(2)/6 + log(2+sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 14 2021
E.g.f.: (9 + exp(x)*(6*x - 8) - exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Jul 26 2024
MAPLE
A047242:=n->n-1+floor((n-1)/3)+floor((2*n-2)/3): seq(A047242(n), n=1..50); # Wesley Ivan Hurt, Dec 03 2014
MATHEMATICA
Select[Range[0, 200], Mod[#, 6] == 0 || Mod[#, 6] == 1 || Mod[#, 6] == 3 &] (* Vladimir Joseph Stephan Orlovsky, Jul 07 2011 *)
PROG
(Haskell)
a047242 n = a047242_list !! n
a047242_list = elemIndices 0 a214090_list
-- Reinhard Zumkeller, Jul 06 2012
(Magma) [n-1+Floor((n-1)/3)+Floor((2*n-2)/3) : n in [1..50]]; // Wesley Ivan Hurt, Dec 03 2014
CROSSREFS
Cf. A047261 (complement).
Sequence in context: A289059 A286686 A082847 * A190335 A083951 A284879
KEYWORD
nonn,easy
STATUS
approved