login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A047292
Numbers that are congruent to {2, 4, 6} mod 7.
2
2, 4, 6, 9, 11, 13, 16, 18, 20, 23, 25, 27, 30, 32, 34, 37, 39, 41, 44, 46, 48, 51, 53, 55, 58, 60, 62, 65, 67, 69, 72, 74, 76, 79, 81, 83, 86, 88, 90, 93, 95, 97, 100, 102, 104, 107, 109, 111, 114, 116, 118, 121, 123, 125, 128, 130, 132, 135, 137, 139, 142, 144
OFFSET
1,1
FORMULA
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = floor((7*n-1)/3). [Gary Detlefs, May 14 2011]
G.f.: x*(2+2*x+2*x^2+x^3)/((1-x)^2*(1+x+x^2)). [Colin Barker, Mar 13 2012]
a(n) = 2*n + ceiling(n/3) - 1. - Arkadiusz Wesolowski, Sep 19 2012
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = (21*n-6-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 7k-1, a(3k-1) = 7k-3, a(3k-2) = 7k-5. (End)
MAPLE
A047292:=n->(21*n-6-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9: seq(A047292(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
MATHEMATICA
Select[Range[0, 125], MemberQ[{2, 4, 6}, Mod[#, 7]]&] (* Vincenzo Librandi, Apr 26 2012 *)
LinearRecurrence[{1, 0, 1, -1}, {2, 4, 6, 9}, 70] (* Harvey P. Dale, Feb 06 2019 *)
PROG
(Magma) I:=[2, 4, 6, 9]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Apr 26 2012
(PARI) a(n) = 2*n + ceil(n/3) - 1; /* Joerg Arndt, Sep 20 2012 */
CROSSREFS
Sequence in context: A292649 A061785 A330118 * A189930 A184627 A203988
KEYWORD
nonn,easy
STATUS
approved