OFFSET
1,3
COMMENTS
Numbers less than 8 or not congruent to 1 (mod 8). - M. F. Hasler, Nov 02 2013
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
FORMULA
From Colin Barker, Jul 23 2016: (Start)
a(n) = a(n-1)+a(n-7)-a(n-8) for n>8.
G.f.: x^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^8) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6)).
(End)
a(1) = 0, a(2) = 1, a(7*n + k + 2) = 8*n + k + 1, n >= 0, 1 <= k < 8. - Yosu Yurramendi, Aug 09 2016
MATHEMATICA
Join[Range[0, 3], Select[Range[4, 80], Take[IntegerDigits[#, 2], -3] != {0, 0, 1} &]] (* Harvey P. Dale, Feb 18 2011 *)
Table[If[n < 9, n - 1, Floor[(8 n - 10)/7]], {n, 69}] (* or *)
Rest@ CoefficientList[Series[x^2 (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^8)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)), {x, 0, 69}], x] (* Michael De Vlieger, Aug 10 2016 *)
PROG
(PARI) a(n)=if(n<9, n-1, (8*n-10)\7) \\ Charles R Greathouse IV, Mar 26 2013
(PARI) concat(0, Vec(x^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^8)/((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6)) + O(x^100))) \\ Colin Barker, Jul 23 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved