|
|
A047293
|
|
Numbers that are congruent to {0, 2, 4, 6} mod 7.
|
|
1
|
|
|
0, 2, 4, 6, 7, 9, 11, 13, 14, 16, 18, 20, 21, 23, 25, 27, 28, 30, 32, 34, 35, 37, 39, 41, 42, 44, 46, 48, 49, 51, 53, 55, 56, 58, 60, 62, 63, 65, 67, 69, 70, 72, 74, 76, 77, 79, 81, 83, 84, 86, 88, 90, 91, 93, 95, 97, 98, 100, 102, 104, 105, 107, 109, 111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor(ceiling((7n + 2)/2)/2).
a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.
G.f.: x^2*(2+2*x+2*x^2+x^3)/((1-x)^2*(1+x)*(1+x^2)). (End)
a(n) = (14n-11+i^(2n)+(1-i)*i^(-n)+(1+i)*i^n)/8 where i=sqrt(-1).
|
|
MAPLE
|
|
|
MATHEMATICA
|
Select[Range[0, 100], MemberQ[{0, 2, 4, 6}, Mod[#, 7]]&] (* Vincenzo Librandi, Apr 26 2012 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 2, 4, 6, 7}, 80] (* Harvey P. Dale, Jun 21 2019 *)
|
|
PROG
|
(Magma) I:=[0, 2, 4, 6, 7]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, Apr 26 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|