OFFSET
0,6
COMMENTS
There is another interesting bilinear form over Q_2 : it is <1, ..., 1, 2>. It has Witt index 0, 0, 0, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 6, 7, 7, ...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 1, -1).
FORMULA
a(n) = 4 floor(n/7) + [0,0,0,0,1,2,3][n%7 + 1]. [Formula corrected by Franklin T. Adams-Watters, Apr 13 2009]
From R. J. Mathar, Apr 16 2009: (Start)
a(n) = a(n-1) + a(n-7) - a(n-8).
G.f.: x^4*(1+x)*(1+x^2)/((x^6+x^5+x^4+x^3+x^2+x+1)*(x-1)^2). (End)
MAPLE
for n from 0 to 120 do printf("%d, ", 4*floor(n/7)+op( (n mod 7)+1, [0, 0, 0, 0, 1, 2, 3]) ) ; od: # R. J. Mathar, Apr 16 2009
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 0, 0, 0, 1, 2, 3, 4}, 80] (* Harvey P. Dale, Jun 21 2012 *)
PROG
(Haskell)
a072229 n = a072229_list !! n
a072229_list = [0, 0, 0, 0, 1, 2, 3, 4] ++ zipWith (+)
(zipWith (-) (tail a072229_list) a072229_list)
(drop 7 a072229_list)
-- Reinhard Zumkeller, Nov 02 2015
(PARI) a(n)=n\7*4 + [0, 0, 0, 0, 1, 2, 3][n%7 + 1] \\ Charles R Greathouse IV, Feb 09 2017
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Gaël Collinet, Jul 05 2002
EXTENSIONS
More terms from R. J. Mathar, Apr 16 2009
STATUS
approved