%I #34 Aug 31 2018 14:20:43
%S -1,1,1,1,1,5,7,13,25,49,89,169,319,601,1129,2129,4009,7549,14215,
%T 26773,50417,94945,178801,336721,634111,1194161,2248849,4235041,
%U 7975441,15019381,28284551,53265565,100309897,188903953
%N Numerical distance between m-th and (m+n)-th spheres in loxodromic sequence of spheres in which each 5 consecutive spheres are in mutual contact.
%D H. S. M. Coxeter, 5 spheres in mutual contact, Abstracts AMS 18 (1997), p. 431, #924-05-202.
%D H. S. M. Coxeter, 1998, Numerical distances among the circles in a loxodromic sequence, Nieuw Arch. Wisk, 16, pp. 1-9.
%H Vincenzo Librandi, <a href="/A027674/b027674.txt">Table of n, a(n) for n = 0..1000</a>
%H H. S. M. Coxeter, <a href="https://doi.org/10.1007/BF03024413">Numerical distances among the spheres in a loxodromic sequence</a>, Math. Intell. 19(4) 1997 pp. 41-47. See page 41.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1, 1, 1, 1, -1).
%F a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) - a(n-5). - corrected by _Harvey P. Dale_, Apr 12 2013
%F 7a(n) = (-1)^(n+1)*2 + 3*Sum_{v=0..floor(n/2}} * (n/(n-v)) * binomial(n-v, v)*u(n-2v) where u(n) = 2u(n-1) + u(n-2) and u(0)=-1, u(1)=2. - _Floor van Lamoen_
%F G.f.:(-1-x^4+x^2+2*x)/((x+1)*(x^4-2*x^3+x^2-2*x+1)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
%p f := proc(n) option remember; if n=0 then -1 elif n=1 then 1 elif n=2 then 1 elif n=3 then 1 elif n=4 then 1 else f(n-1)+f(n-2)+f(n-3)+f(n-4)-f(n-5); fi; end;
%t CoefficientList[ Series[ (-1+2x+x^2-x^4) / (1-x-x^2-x^3-x^4+x^5), {x, 0, 33}], x] (* _Jean-François Alcover_, Nov 29 2011, after Maksym Voznyy *)
%t LinearRecurrence[{1,1,1,1,-1},{-1,1,1,1,1},40] (* _Harvey P. Dale_, Apr 12 2013 *)
%o (PARI) a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -1,1,1,1,1]^n*[-1;1;1;1;1])[1,1] \\ _Charles R Greathouse IV_, Jun 16 2015
%K sign,nice,easy
%O 0,6
%A _N. J. A. Sloane_