A047239 Numbers that are congruent to {1, 2} (mod 6).
1, 2, 7, 8, 13, 14, 19, 20, 25, 26, 31, 32, 37, 38, 43, 44, 49, 50, 55, 56, 61, 62, 67, 68, 73, 74, 79, 80, 85, 86, 91, 92, 97, 98, 103, 104, 109, 110, 115, 116, 121, 122, 127, 128, 133, 134, 139, 140, 145, 146, 151
Offset: 1
Keywords
Links
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Crossrefs
Cf. A047264.
Programs
-
Mathematica
Select[Range[200],MemberQ[{1,2},Mod[#,6]]&] (* or *) LinearRecurrence[ {1,1,-1},{1,2,7},80] (* Harvey P. Dale, Nov 23 2011 *)
Formula
a(n) = 3*(n-1) - (-1)^n. - Rolf Pleisch, Aug 04 2009
a(n) = 6*n - a(n-1) - 9 (with a(1)=1). - Vincenzo Librandi, Aug 05 2010
G.f. x*(1+x+4*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) + a(n-2) - a(n-3) with a(1)=1, a(2)=2, a(3)=7. - Harvey P. Dale, Nov 23 2011
E.g.f.: 4 + 3*exp(x)*(x - 1) - exp(-x). - Stefano Spezia, Oct 09 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/18 + log(2)/3. - Amiram Eldar, Dec 13 2021
Comments