login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045626 Bends in loxodromic sequence of spheres in which each 5 consecutive spheres are in mutual contact. 1

%I #15 Sep 08 2022 08:44:56

%S -1,2,3,3,5,14,23,42,81,155,287,542,1023,1926,3623,6827,12857,24210,

%T 45591,85862,161693,304499,573435,1079898,2033663,3829802,7212299,

%U 13582227,25578093,48168758,90711575,170828354

%N Bends 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; also Math. Intell. 19(4) 1997 pp. 41-47.

%H G. C. Greubel, <a href="/A045626/b045626.txt">Table of n, a(n) for n = 0..1000</a>

%F G.f.: -(1-3*x-2*x^2+x^3+2*x^4)/((1+x)*(1-2*x+x^2-2*x^3+x^4)) (conjectured). - _Ralf Stephan_, May 06 2004

%p a:= proc(n) option remember;

%p if n=0 then -1

%p elif n=1 then 2

%p elif n<=3 then 3

%p elif n=4 then 5

%p else a(n-1)+a(n-2)+a(n-3)+a(n-4)-a(n-5);

%p fi; end;

%p seq(a(n), n=0..40);

%t a[n_]:= a[n]= If[n==0, -1, If[n<3, n+1, If[n<5, 2*n-3, a[n-1] +a[n-2] +a[n-3] +a[n-4] -a[n-5]]]]; Table[a[n], {n,0,40}] (* _G. C. Greubel_, Jan 13 2020 *)

%o (PARI) a(n) = if(n==0, -1, if(n<3, n+1, if(n<5, 2*n-3, a(n-1) +a(n-2) +a(n-3) +a(n-4) -a(n-5) )));

%o vector(41, n, a(n-1)) \\ _G. C. Greubel_, Jan 13 2020

%o (Magma) I:=[-1,2,3,3,5]; [n le 5 select I[n] else Self(n-1) +Self(n-2) +Self(n-3) +Self(n-4) -Self(n-5): n in [1..40]]; // _G. C. Greubel_, Jan 13 2020

%o (Sage)

%o @CachedFunction

%o def a(n):

%o if (n==0): return -1

%o elif (n<3): return n+1

%o elif (n<5): return 2*n-3

%o else: return a(n-1)+a(n-2)+a(n-3)+a(n-4)-a(n-5)

%o [a(n) for n in (0..40)] # _G. C. Greubel_, Jan 13 2020

%o (GAP) a:=[-1,2,3,3,5];; for n in [6..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]+a[n-4] -a[n-5]; od; a; # _G. C. Greubel_, Jan 13 2020

%K sign

%O 0,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)