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

A007912 Quantum factorials: (n-1)!! - (n-2)!! (mod n).

Original entry on oeis.org

1, 1, 0, 1, 5, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 9, 2, 15, 0, 1, 2, 9, 0, 1, 0, 7, 0, 15, 2, 1, 0, 1, 0, 27, 0, 1, 0, 25, 0, 21, 2, 11, 0, 1, 45, 33, 0, 25, 0, 39, 0, 27, 0, 49, 0, 1, 57, 15, 0, 1, 0, 1, 0, 33, 2, 51, 0, 35, 2, 9, 0, 1, 0, 19, 0, 39, 77, 65, 0, 1, 81, 63, 0, 1, 0, 33, 0, 45, 0
Offset: 3

Views

Author

Keywords

References

  • S. P. Hurd and J. S. McCranie, Quantum factorials. Proceedings of the Twenty-fifth Southeastern International Conference on Combinatorics, Graph Theory and Computing (Boca Raton, FL, 1994). Congr. Numer. 104 (1994), 19-24.

Crossrefs

Programs

  • Maple
    a:= n-> (d-> irem(d(n-1)-d(n-2), n))(doublefactorial):
    seq(a(n), n=3..100);  # Alois P. Heinz, Dec 17 2021
  • Mathematica
    Table[Mod[(n-1)!!-(n-2)!!,n],{n,3,100}] (* Harvey P. Dale, Aug 07 2012 *)

Formula

a(n) = 0 iff n is odd and not a prime congruent to 3 modulo 4. - Charlie Neder, Feb 24 2019

A230698 Triangle read by rows: T(n,k) = T(n-1,k-1) + n*T(n-2,k); T(0,0) = T(1,0) = T(1,1) = 1, T(n,k) = 0 if k>n or if k<0.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 8, 7, 9, 1, 1, 15, 33, 12, 14, 1, 1, 48, 57, 87, 18, 20, 1, 1, 105, 279, 141, 185, 25, 27, 1, 1, 384, 561, 975, 285, 345, 33, 35, 1, 1, 945, 2895, 1830, 2640, 510, 588, 42, 44, 1, 1, 3840, 6555, 12645, 4680, 6090, 840, 938, 52, 54, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Oct 28 2013

Keywords

Comments

Triangle A180048 mixed with triangle A180049.
Let p(n,x) be the polynomial whose coefficients are given by row n; e.g., p(2,x) = 2 + x + x^2; then p(n,x) is the numerator of the rational function given by f(n,x) = x + (n - 1)/f(n-1,x), where f(x,0) = 1. (Sum of numbers in row n) = A000885(n) for n >= 1. (Column 1) = A006882 (n-th term = n!! for n >= 0) - Clark Kimberling, Oct 19 2014

Examples

			Triangle begins (0<=k<=n):
1
1, 1
2, 1, 1
3, 5, 1, 1
8, 7, 9, 1, 1
15, 33, 12, 14, 1, 1
48, 57, 87, 18, 20, 1, 1
105, 279, 141, 185, 25, 27, 1, 1
384, 561, 975, 285, 345, 33, 35, 1, 1
945, 2895, 1830, 2640, 510, 588, 42, 44, 1, 1
3840, 6555, 12645, 4680, 6090, 840, 938, 52, 54, 1, 1
10395, 35685, 26685, 41685, 10290, 12558, 1302, 1422, 63, 65, 1, 1
		

Crossrefs

Programs

  • Mathematica
    t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 1; t[n_, k_] := t[n, k] = If[k > n || k < 0, 0, t[n - 1, k - 1] + n*t[n - 2, k]]; Table[t[n, k], {n, 0, 10}, {k, 0, n}](* Clark Kimberling, Oct 19 2014 *)
    (* Next, the polynomials *); z = 20; f[x_, n_] := x + n/f[x, n - 1]; f[x_, 0] = 1; t = Table[Factor[f[x, n]], {n, 0, z}]; u = Numerator[t]; TableForm[Rest[Table[CoefficientList[u[[n]], x], {n, 0, z}]]]  (* A249057 array *)
    Flatten[CoefficientList[u, x]] (* A249057 sequence *)
    (* Clark Kimberling, Oct 19 2014 *)

Formula

T(n,k) = T(n-1,k-1) + n*T(n-2,k); T(0,0) = T(1,0) = T(1,1) = 1, T(n,k) = 0 if k>n or if k<0.
T(n,0) = A006882(n).
T(n+1,1) = A007911(n+3).
Sum_{k=0..n} T(n,k) = A000085(n+1).

Extensions

Corrected by Clark Kimberling, Oct 21 2014

A204912 Ordered differences of double factorials.

Original entry on oeis.org

1, 2, 1, 7, 6, 5, 14, 13, 12, 7, 47, 46, 45, 40, 33, 104, 103, 102, 97, 90, 57, 383, 382, 381, 376, 369, 336, 279, 944, 943, 942, 937, 930, 897, 840, 561, 3839, 3838, 3837, 3832, 3825, 3792, 3735, 3456, 2895, 10394, 10393, 10392, 10387, 10380
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2012

Keywords

Comments

For a guide to related sequences, see A204892.
As a triangle with rows {1}, {2,1}, {7,6,5}, ..., evidently the first diagonal is A007911 = {1,1,5,7,33,57,279,...} (up to an offset). - L. Edson Jeffery, Jan 24 2012

Examples

			a(1)=2!!-1!!=2-1=1
a(2)=3!!-1!!=3-1=2
a(3)=3!!-2!!=3-2=1
a(4)=4!!-1!!=8-1=7
a(5)=4!!-2!!=8-2=6
		

Crossrefs

Programs

  • Mathematica
    (See the program at A204982.)

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