cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072345 Volume of n-dimensional sphere of radius r is V_n*r^n = Pi^(n/2)*r^n/(n/2)! = C_n*Pi^floor(n/2)*r^n; sequence gives numerator of C_n.

Original entry on oeis.org

1, 2, 1, 4, 1, 8, 1, 16, 1, 32, 1, 64, 1, 128, 1, 256, 1, 512, 1, 1024, 1, 2048, 1, 4096, 1, 8192, 1, 16384, 1, 32768, 1, 65536, 1, 131072, 1, 262144, 1, 524288, 1, 1048576, 1, 2097152, 1, 4194304, 1, 8388608, 1, 16777216, 1, 33554432, 1, 67108864, 1, 134217728, 1, 268435456
Offset: 0

Views

Author

N. J. A. Sloane, Jul 31 2002

Keywords

Comments

Answer to question of how to extend the sequence 1, 2 r, Pi r^2, 4 Pi r^3 / 3, Pi^2 r^4 / 2, ...
Surface area of n-dimensional sphere of radius r is n*V_n*r^(n-1). - see A072478/A072479.

Examples

			Sequence of C_n's begins 1, 2, 1, 4/3, 1/2, 8/15, 1/6, 16/105, 1/24, 32/945, 1/120, 64/10395, ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 9, Eq. 17.

Crossrefs

Programs

  • Magma
    [2^((n+1) div 2)*(1-(-1)^n)/2+(1+(-1)^n)/2 : n in [0..100]]; // Wesley Ivan Hurt, Jan 10 2017
    
  • Maple
    seq(seq(k^n, k=1..2), n=1..28); # Zerinvary Lajos, Jun 29 2007
  • Mathematica
    f[n_] := Pi^(n/2 - Floor[n/2])/(n/2)!; Table[ Numerator[ f[n]], {n, 0, 55} ]
    Riffle[2^Range[30],1,{1,-1,2}] (* or *) LinearRecurrence[{0,3,0,-2},{1,2,1,4},60] (* Harvey P. Dale, Oct 16 2013 *)
    CoefficientList[ Series[(-2x^3 - 2x^2 + 2x + 1)/(2x^4 - 3x^2 + 1), {x, 0, 56}], x] (* Robert G. Wilson v, Jul 31 2018 *)
  • Python
    def A072345(n): return 2<<(n>>1) if n&1 else 1 # Chai Wah Wu, Sep 24 2024

Formula

1 if n even, 2^((n+1)/2) if n odd.
a(n) = 3*a(n-2)-2*a(n-4). G.f.: (1+2*x-2*x^2-2*x^3)/((1-x)*(1+x)*(1-2*x^2)). [Colin Barker, Sep 04 2012]
a(n) = 2^((n+1)/2)*(1-(-1)^n)/2+(1+(-1)^n)/2. - Wesley Ivan Hurt, Jan 10 2017
E.g.f.: sqrt(2)*sinh(sqrt(2)*x) + cosh(x). - Ilya Gutkovskiy, Mar 16 2017