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.

Showing 1-9 of 9 results.

A047037 T(n,n+2), array T as in A004730.

Original entry on oeis.org

1, 3, 10, 35, 125, 455, 1680, 6270, 23591, 89335, 340076, 1300234, 4989504, 19206500, 74132230, 286802444, 1111864311, 4318284037, 16798674426, 65444081290, 255290775209, 997047334415, 3898217039280, 15256167628139
Offset: 0

Views

Author

Keywords

A004731 a(0) = 1; thereafter a(n) = denominator of (n-2)!! / (n-1)!!.

Original entry on oeis.org

1, 1, 1, 2, 3, 8, 15, 16, 35, 128, 315, 256, 693, 1024, 3003, 2048, 6435, 32768, 109395, 65536, 230945, 262144, 969969, 524288, 2028117, 4194304, 16900975, 8388608, 35102025, 33554432, 145422675, 67108864, 300540195, 2147483648, 9917826435, 4294967296, 20419054425
Offset: 0

Views

Author

Keywords

Comments

Also numerator of rational part of Haar measure on Grassmannian space G(n,1).
Also rational part of numerator of Gamma(n/2+1)/Gamma(n/2+1/2) (cf. A036039).
Let x(m) = x(m-2) + 1/x(m-1) for m >= 3, with x(1)=x(2)=1. Then the numerator of x(n+2) equals the denominator of n!!/(n+1)!! for n >= 0, where the double factorials are given by A006882. - Joseph E. Cooper III (easonrevant(AT)gmail.com), Nov 07 2010, as corrected in Cooper (2015).
Numerator of (n-1)/( (n-2)/( .../1)), with an empty fraction taken to be 1. - Flávio V. Fernandes, Jan 31 2025

Examples

			1, 1, (1/2)*Pi, 2, (3/4)*Pi, 8/3, (15/16)*Pi, 16/5, (35/32)*Pi, 128/35, (315/256)*Pi, ...
The sequence Gamma(n/2+1)/Gamma(n/2+1/2), n >= 0, begins 1/Pi^(1/2), 1/2*Pi^(1/2), 2/Pi^(1/2), 3/4*Pi^(1/2), 8/3/Pi^(1/2), 15/16*Pi^(1/2), 16/5/Pi^(1/2), ...
		

References

  • D. A. Klain and G.-C. Rota, Introduction to Geometric Probability, Cambridge, p. 67.

Crossrefs

Cf. A001803, A004730, A006882 (double factorials), A036069.

Programs

  • Haskell
    import Data.Ratio ((%), numerator)
    a004731 0 = 1
    a004731 n = a004731_list !! n
    a004731_list = map numerator ggs where
       ggs = 0 : 1 : zipWith (+) ggs (map (1 /) $ tail ggs) :: [Rational]
    -- Reinhard Zumkeller, Dec 08 2011
    
  • Maple
    if n mod 2 = 0 then k := n/2; 2*k*Pi*binomial(2*k-1,k)/4^k else k := (n-1)/2; 4^k/binomial(2*k,k); fi;
    f:=n->simplify(GAMMA(n/2+1)/GAMMA(n/2+1/2));
    #
    [1, seq(denom(doublefactorial(n-2)/doublefactorial(n-1)), n = 1..36)]; # Peter Luschny, Feb 09 2025
  • Mathematica
    Table[ Denominator[ (n-2)!! / (n-1)!! ], {n, 0, 31}] (* Jean-François Alcover, Jul 16 2012 *)
    Denominator[#[[1]]/#[[2]]&/@Partition[Range[-2,40]!!,2,1]] (* Harvey P. Dale, Nov 27 2014 *)
    Join[{1},Table[Numerator[(n/2-1/2)!/((n/2-1)!Sqrt[Pi])], {n,1,31}]] (* Peter Luschny, Feb 08 2025 *)
  • PARI
    f(n) = prod(i=0, (n-1)\2, n - 2*i); \\ A006882
    a(n) = if (n==0, 1, denominator(f(n-2)/f(n-1))); \\ Michel Marcus, Feb 08 2025
  • Python
    from sympy import gcd, factorial2
    def A004731(n):
        if n <= 1:
            return 1
        a, b = factorial2(n-2), factorial2(n-1)
        return b//gcd(a,b) # Chai Wah Wu, Apr 03 2021
    

Extensions

Name corrected by Michel Marcus, Feb 08 2025

A076668 Decimal expansion of sqrt(2/Pi).

Original entry on oeis.org

7, 9, 7, 8, 8, 4, 5, 6, 0, 8, 0, 2, 8, 6, 5, 3, 5, 5, 8, 7, 9, 8, 9, 2, 1, 1, 9, 8, 6, 8, 7, 6, 3, 7, 3, 6, 9, 5, 1, 7, 1, 7, 2, 6, 2, 3, 2, 9, 8, 6, 9, 3, 1, 5, 3, 3, 1, 8, 5, 1, 6, 5, 9, 3, 4, 1, 3, 1, 5, 8, 5, 1, 7, 9, 8, 6, 0, 3, 6, 7, 7, 0, 0, 2, 5, 0, 4, 6, 6, 7, 8, 1, 4, 6, 1, 3, 8, 7, 2, 8, 6, 0, 6, 0
Offset: 0

Views

Author

Zak Seidov, Oct 25 2002

Keywords

Comments

This is the limit of (n+1)!!/n!!/n^(1/2) at n_even->inf.
Expected value of |x - mu|/sigma for normal distribution with mean mu and standard deviation sigma (i.e., the normalized mean absolute deviation). - Stanislav Sykora, Jun 30 2017

Examples

			0.79788456080286535587989211986876373695171726232986931533...
		

Crossrefs

Cf. A004730, A004731, A019727, A060294 (Buffon's constant 2/Pi), A092678 (probable error).

Programs

  • Magma
    pi:=Sqrt(2/Pi(RealField(110))); Reverse(Intseq(Floor(10^110*pi))); // Vincenzo Librandi, Jul 01 2017
    
  • Mathematica
    RealDigits[Sqrt[2/Pi],10,120][[1]] (* Harvey P. Dale, Feb 05 2012 *)
  • PARI
    sqrt(2/Pi) \\ G. C. Greubel, Sep 23 2017

Formula

Equals A087197*A002193. - R. J. Mathar Feb 05 2009
Equals integral_{-infinity..infinity} (1-erf(x)^2)/2 dx. - Jean-François Alcover, Feb 25 2015

Extensions

More terms and better description from Benoit Cloitre and Michael Somos, Oct 29 2002
Leading zero removed, offset changed by R. J. Mathar, Feb 05 2009

A338719 Define b(1)=1 and for n>1, b(n)=n/b(n-1); then a(n) = ceiling(b(n)).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 4, 3, 5, 3, 5, 3, 5, 4, 6, 4, 6, 4, 6, 4, 6, 4, 7, 5, 7, 5, 7, 5, 7, 5, 8, 5, 8, 5, 8, 5, 8, 6, 8, 6, 9, 6, 9, 6, 9, 6, 9, 6, 9, 6, 10, 6, 10, 6, 10, 7, 10, 7, 10, 7, 10, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 8, 12, 8, 12, 8, 12, 8, 12, 8, 12, 8
Offset: 1

Views

Author

N. J. A. Sloane, Nov 29 2020, following a suggestion from Anchar Koops, Nov 24 2020

Keywords

Examples

			The first few fractions b(n) are 1, 2, 3/2, 8/3, 15/8, 16/5, 35/16, 128/35, 315/128, 256/63, 693/256, 1024/231, 3003/1024, 2048/429, ...
		

Crossrefs

For the numerators and denominators of b(n) see A004731 and A004730.

Programs

  • Maple
    R:= 1:
    b:= 1:
    for i from 2 to 100 do
      b:= i/b;
      R:= R, ceil(b)
    od:
    R; # Robert Israel, Jul 21 2024

A338720 Define b(1)=1 and for n>1, b(n)=n/b(n-1); then a(n) = nearest integer to b(n).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 4, 2, 4, 3, 4, 3, 5, 3, 5, 3, 5, 4, 6, 4, 6, 4, 6, 4, 6, 4, 7, 4, 7, 4, 7, 5, 7, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 9, 5, 9, 6, 9, 6, 9, 6, 9, 6, 9, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 7, 10, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 12, 7, 12, 7
Offset: 1

Views

Author

N. J. A. Sloane, Nov 29 2020, following a suggestion from Anchar Koops, Nov 24 2020

Keywords

Comments

Since b(3) = 3/2, a(3) could also be taken to be 1.

Examples

			The first few fractions b(n) are 1, 2, 3/2, 8/3, 15/8, 16/5, 35/16, 128/35, 315/128, 256/63, 693/256, 1024/231, 3003/1024, 2048/429, ...
		

Crossrefs

For the numerators and denominators of b(n) see A004731 and A004730.

Programs

  • Maple
    A338720b := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            n/procname(n-1) ;
        end if;
    end proc:
    A338720 := proc(n)
        round(A338720b(n)) ;
    end proc:
    seq(A338720(n),n=1..87) ; # R. J. Mathar, Dec 01 2020
  • Mathematica
    b[n_] := b[n] = If[n == 1, 1, n/b[n-1]];
    a[n_] := Round[b[n]];
    Table[a[n], {n, 1, 87}] (* Jean-François Alcover, Apr 23 2023 *)

A380909 a(n) = numerator(n!! / (n - 1)!!).

Original entry on oeis.org

1, 1, 2, 3, 8, 15, 16, 35, 128, 315, 256, 693, 1024, 3003, 2048, 6435, 32768, 109395, 65536, 230945, 262144, 969969, 524288, 2028117, 4194304, 16900975, 8388608, 35102025, 33554432, 145422675, 67108864, 300540195, 2147483648, 9917826435, 4294967296, 20419054425
Offset: 0

Views

Author

Peter Luschny, Feb 09 2025

Keywords

Comments

Perhaps surprisingly, the double factorial is also defined for n = -1. The reason for this is that (-1/2)! is well defined. See the first formula.

Crossrefs

Cf. A380910 (denominator), A006882, A095987, A004730, A004731.

Programs

  • Maple
    seq(numer(doublefactorial(n) / doublefactorial(n - 1)), n = 0..20);
    # Alternative:
    a := n -> numer((GAMMA(n/2 + 1) / GAMMA(n/2 + 1/2)) * ifelse(n::even, sqrt(Pi), 2/sqrt(Pi))):
    seq(a(n), n = 0..35);
  • Mathematica
    A380909[n_] := Numerator[n!!/(n - 1)!!]; Array[A380909, 50, 0] (* or *)
    Numerator[FoldList[#2/# &, 1, Range[49]]] (* Paolo Xausa, Feb 11 2025 *)
  • Python
    from fractions import Fraction
    from functools import cache
    @cache
    def R(n: int) -> Fraction:
        if n == 0: return Fraction(1, 1)
        return Fraction(n, 1) / R(n - 1)
    def aList(upto:int) -> list[int]:
        return [R(n).numerator for n in range(upto + 1)]
    print(aList(35))

Formula

r(n) = ((n/2)! / ((n - 1) / 2)!) * [sqrt(Pi) if n is even otherwise 2/sqrt(Pi)].
r(n) = n / r(n - 1) for n >= 1.
r(n) ~ sqrt(n)*exp(1/(4*n))*(Pi/2)^(cos(Pi*n)/2).
Product_{k=0..n} r(k) = A006882(n).
a(n) = numerator(r(n)).
a(n) = A006882(n)/A095987(n). - R. J. Mathar, Feb 10 2025
a(n) = A004731(n+1). - R. J. Mathar, Feb 10 2025

A380910 a(n) = denominator(n!! / (n - 1)!!).

Original entry on oeis.org

1, 1, 1, 2, 3, 8, 5, 16, 35, 128, 63, 256, 231, 1024, 429, 2048, 6435, 32768, 12155, 65536, 46189, 262144, 88179, 524288, 676039, 4194304, 1300075, 8388608, 5014575, 33554432, 9694845, 67108864, 300540195, 2147483648, 583401555, 4294967296, 2268783825, 17179869184
Offset: 0

Views

Author

Peter Luschny, Feb 09 2025

Keywords

Crossrefs

Cf. A380909 (numerator).

Programs

  • Maple
    seq(denom(doublefactorial(n) / doublefactorial(n - 1)), n = 0..20);
    # Alternative:
    a := n -> denom((GAMMA(n/2 + 1) / GAMMA(n/2 + 1/2)) * ifelse(n::even, sqrt(Pi), 2/sqrt(Pi))):
    seq(a(n), n = 0..35);
  • Mathematica
    A380910[n_] := Denominator[n!!/(n - 1)!!]; Array[A380910, 50, 0] (* or *)
    Denominator[FoldList[#2/# &, 1, Range[49]]] (* Paolo Xausa, Feb 11 2025 *)
  • Python
    from fractions import Fraction
    from functools import cache
    @cache
    def R(n: int) -> Fraction:
        if n == 0: return Fraction(1, 1)
        return Fraction(n, 1) / R(n - 1)
    def aList(upto:int) -> list[int]:
        return [R(n).denominator for n in range(upto + 1)]
    print(aList(37))

Formula

r(n) = ((n/2)! / ((n - 1) / 2)!) * [sqrt(Pi) if n is even otherwise 2/sqrt(Pi)].
a(n) = denominator(r(n)).
a(n) = A004730(n-1). - R. J. Mathar, Feb 10 2025
a(n) = A006882(n-1)/A095987(n). - R. J. Mathar, Feb 10 2025

A338718 Define b(1)=1 and for n>1, b(n)=n/b(n-1); then a(n) = floor(b(n)).

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 3, 2, 4, 2, 4, 2, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 4, 6, 4, 6, 4, 6, 4, 7, 4, 7, 4, 7, 4, 7, 5, 7, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 9, 5, 9, 5, 9, 6, 9, 6, 9, 6, 9, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11, 7, 11
Offset: 1

Views

Author

N. J. A. Sloane, Nov 29 2020, following a suggestion from Anchar Koops, Nov 24 2020

Keywords

Examples

			The first few fractions b(n) are 1, 2, 3/2, 8/3, 15/8, 16/5, 35/16, 128/35, 315/128, 256/63, 693/256, 1024/231, 3003/1024, 2048/429, ...
		

Crossrefs

For the numerators and denominators of b(n) see A004731 and A004730.

Programs

  • Mathematica
    a[n_] := Floor[n!!/(n - 1)!!]; Array[a, 90] (* Robert G. Wilson v, Dec 06 2020 *)

A086767 Last coefficient of the last term in the numerator of the simplified expansion of the solutions of FLT for n=2 for FLT n=1,2,3,..

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 7, 1, 1, 1, 9, 1, 5, 1, 11, 1, 3, 1, 13, 1, 7, 1, 15, 1, 1, 1, 17, 1, 9, 1, 19, 1, 5, 1, 21, 1, 11, 1, 23, 1, 3, 1, 25, 1, 13, 1, 27, 1, 7, 1, 29, 1, 15, 1, 31, 1, 1, 1, 33, 1, 17, 1, 35, 1, 9, 1, 37, 1, 19, 1, 39, 1, 5, 1, 41, 1, 21, 1, 43, 1, 11, 1, 45, 1, 23
Offset: 0

Views

Author

Cino Hilliard, Aug 02 2003

Keywords

Comments

Integers a > b form the solution to FLT n = 2 as follows. (2ab)^2 = (a^2-b^2)^2 - (a^2+b^2)^2. The sequence is the coefficient c of the last b term in the numerator for the simplified expansion of the solution for n=2 as verification of FLT for n=1, 2, ...

Examples

			b/a
1
(3*a^4 + b^4)/(4*b*a^3)
(a^4 + b^4)/(2*b^2*a^2)
(5*a^8 + 10*b^4*a^4 + b^8)/(16*b^3*a^5)
(3*a^8 + 10*b^4*a^4 + 3*b^8)/(16*b^4*a^4)
(7*a^12 + 35*b^4*a^8 + 21*b^8*a^4 + b^12)/(64*b^5*a^7)
(a^12 + 7*b^4*a^8 + 7*b^8*a^4 + b^12)/(16*b^6*a^6)
(9*a^16 + 84*b^4*a^12 + 126*b^8*a^8 + 36*b^12*a^4 + b^16)/(256*b^7*a^9)
(5*a^16 + 60*b^4*a^12 + 126*b^8*a^8 + 60*b^12*a^4 + 5*b^16)/(256*b^8*a^8)
........
(K + cb^m)/2^m1b^m2c^m3
Seq = c for integers K,b,m1,m2,m3,n = 1,2,3...
		

Crossrefs

Programs

  • Maple
    sigma := proc(n) local i; add(i,i=convert(n,base,2)) end:
    a := proc(n) if n=0 or type(n,odd) then 1 else if type(iquo(n,2),odd) then n/2 else n/2^(1-sigma(n)+sigma(n-1)) fi fi end: # Peter Luschny, Aug 03 2009
  • PARI
    \ verification of general solution in integers \ a>b,x = 2ab,y=a^2-b^2,z=a^2+b^2 \ or FLT n=2 x^n+y^n <> z^n = (2ab)^n + (a^2-b^2)^n <> \(a^2+b^2)^n for n > 2 flt(n,a1,b1) = for(x=0,n,print(f(x,a1,b1))) f(n,a,b) = simplify(((a^2+b^2)^n - (a^2-b^2)^n)/(2*a*b)^n) coeffb(m) = { for(y=1,m, n=y; if(n%2,x=1, while(n%2==0,n=n/2); x=n; ); print1(x",") ) }

Formula

a(n) = A004731(n+1)/A004730(n). - Flávio V. Fernandes, Feb 13 2025
Showing 1-9 of 9 results.