A047258 Numbers that are congruent to {0, 4, 5} mod 6.
0, 4, 5, 6, 10, 11, 12, 16, 17, 18, 22, 23, 24, 28, 29, 30, 34, 35, 36, 40, 41, 42, 46, 47, 48, 52, 53, 54, 58, 59, 60, 64, 65, 66, 70, 71, 72, 76, 77, 78, 82, 83, 84, 88, 89, 90, 94, 95, 96, 100, 101, 102, 106, 107, 108, 112, 113, 114, 118, 119, 120, 124
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Crossrefs
Cf. A047245 (complement).
Programs
-
Magma
[2*n-2+((2*n-2) mod 3) : n in [1..100]]; // Wesley Ivan Hurt, Apr 13 2015
-
Maple
A047258:=n->2*n-2+((2*n-2) mod 3): seq(A047258(n), n=1..100); # Wesley Ivan Hurt, Apr 13 2015
-
Mathematica
Flatten[#+{0,4,5}&/@(6Range[0,20])] (* Harvey P. Dale, Jul 20 2011 *) Select[Range[0, 200], MemberQ[{0, 4, 5}, Mod[#, 6]] &] (* Vincenzo Librandi, Apr 14 2015 *)
-
PARI
concat (0, Vec(x^2*(4+x+x^2)/((1+x+x^2)*(x-1)^2) + O(x^80))) \\ Michel Marcus, Apr 14 2015
Formula
G.f.: x^2*(4+x+x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 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) = 2n-2 + ((2n-2) mod 3). (End)
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = 2*n-1-2*sin(2*n*Pi/3)/sqrt(3).
a(3k) = 6k-1, a(3k-1) = 6k-2, a(3k-2) = 6k-6. (End)
E.g.f.: 1 + (2*x - 1)*exp(x) - 2*sin(sqrt(3)*x/2)*(cosh(x/2) - sinh(x/2))/sqrt(3). - Ilya Gutkovskiy, Jun 14 2016
Sum_{n>=2} (-1)^n/a(n) = log(2+sqrt(3))/(2*sqrt(3)) - (3-sqrt(3))*Pi/18. - Amiram Eldar, Dec 14 2021
Extensions
More terms from Wesley Ivan Hurt, Apr 13 2015