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-3 of 3 results.

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

A227415 a(n) = (n+1)!! mod n!!.

Original entry on oeis.org

0, 0, 1, 2, 7, 3, 9, 69, 177, 60, 2715, 4500, 42975, 104580, 91665, 186795, 3493665, 13497435, 97345395, 442245825, 2601636975, 13003053525, 70985324025, 64585694250, 57891366225, 3576632909850, 9411029102475, 147580842959550, 476966861546175, 5708173568847750
Offset: 0

Views

Author

Alex Ratushnyak, Jul 10 2013

Keywords

Comments

a(n) is divisible by A095987(n+1), and is nonzero for n > 1. - Robert Israel, Mar 10 2016

Examples

			a(4) = 5*3 mod 4*2 = 15 mod 8 = 7.
		

Crossrefs

Cf. A007911: (n-1)!! - (n-2)!!
Cf. A007912: (n-1)!! - (n-2)!! (mod n).
Cf. A060696: (n-1)!! + (n-2)!! except first two terms.

Programs

  • Maple
    seq(doublefactorial(n+1) mod doublefactorial(n), n=0..100); # Robert Israel, Mar 10 2016
  • Python
    for n in range(2, 77):
        prOdd = prEven = 1
        for i in range(1, n, 2): prOdd *= i
        for i in range(2, n, 2): prEven *= i
        if n&1: print(prEven % prOdd, end=', ')
        else:   print(prOdd % prEven, end=', ')

Formula

a(n) = A006882(n+1) mod A006882(n).
Showing 1-3 of 3 results.