%I #15 Feb 09 2017 03:16:19
%S 0,0,0,0,1,2,3,4,4,4,4,5,6,7,8,8,8,8,9,10,11,12,12,12,12,13,14,15,16,
%T 16,16,16,17,18,19,20,20,20,20,21,22,23,24,24,24,24,25,26,27,28,28,28,
%U 28,29,30,31,32,32,32,32,33,34,35,36,36,36,36,37,38,39,40,40,40,40,41,42
%N Witt index of the standard bilinear form <1,1,1,...,1> over the 2-adic rationals.
%C 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, ...
%H Harvey P. Dale, <a href="/A072229/b072229.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, 0, 1, -1).
%F 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]
%F From _R. J. Mathar_, Apr 16 2009: (Start)
%F a(n) = a(n-1) + a(n-7) - a(n-8).
%F 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)
%p 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
%t LinearRecurrence[{1,0,0,0,0,0,1,-1},{0,0,0,0,1,2,3,4},80] (* _Harvey P. Dale_, Jun 21 2012 *)
%o (Haskell)
%o a072229 n = a072229_list !! n
%o a072229_list = [0, 0, 0, 0, 1, 2, 3, 4] ++ zipWith (+)
%o (zipWith (-) (tail a072229_list) a072229_list)
%o (drop 7 a072229_list)
%o -- _Reinhard Zumkeller_, Nov 02 2015
%o (PARI) a(n)=n\7*4 + [0,0,0,0,1,2,3][n%7 + 1] \\ _Charles R Greathouse IV_, Feb 09 2017
%K nonn,nice,easy
%O 0,6
%A _Gaƫl Collinet_, Jul 05 2002
%E More terms from _R. J. Mathar_, Apr 16 2009