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.

A052169 Equivalent of the Kurepa hypothesis for left factorial.

Original entry on oeis.org

1, 2, 5, 19, 91, 531, 3641, 28673, 254871, 2523223, 27526069, 328018989, 4239014627, 59043418019, 881715042417, 14052333488521, 238063061452591, 4271909380510383, 80941440893880941, 1614781745832924773, 33833522293642233339, 742799603083145395579
Offset: 2

Views

Author

Aleksandar Petojevic, Jan 26 2000

Keywords

Crossrefs

Pairwise sums of A002467.

Programs

  • Maple
    a[2] := 1: a[3] := 2: for n from 4 to 21 do a[n] := (n-2)*a[n-1]+(n-3)*a[n-2] end do: seq(a[n], n = 2 .. 21); # Emeric Deutsch, Jun 15 2009
    # second Maple program:
    a:= proc(n) option remember; `if`(n<4, n-1,
          (n-2)*a(n-1)+(n-3)*a(n-2))
        end:
    seq(a(n), n=2..25);  # Alois P. Heinz, Aug 30 2016
  • Mathematica
    Numerator[k=1; NestList[1+1/(k++ #1)&,1,12]] (* Wouter Meeussen, Mar 24 2007 *)
    a[n_] := (n! - Subfactorial[n])/(n-1); Table[a[n], {n, 2, 23}] (* Jean-François Alcover, Jul 21 2017, after Emeric Deutsch's comment *)
  • Sage
    from sage.combinat.sloane_functions import ExtremesOfPermanentsSequence2 ; e = ExtremesOfPermanentsSequence2() ; it = e.gen(1,2,1) ; [next(it) for i in range(20)] #(5 rows) # Zerinvary Lajos, May 15 2009

Formula

a(2) = 1, a(3) = 2, a(n) = (n-2)*a(n-1) + (n-3)*a(n-2).
a(n) = A002467(n)/(n-1) (A002467(n) = number of non-derangements of {1,2,...,n}). - Emeric Deutsch, Jun 15 2009
a(n) = 2*floor((n+1)!*(n+3)/e+1/2) - 3*(floor(((n+1)!+1)/e)+ floor(((n+2)!+1)/e)) +(n+1)!+(n+2)!, n>1, with offset 0..a(0)= 1. - Gary Detlefs, Apr 18 2010
a(n) = 1/(n+1)*((n+2)!-floor(((n+2)!+1)/e)), with offset 0 a(n) = 1/(n-1)*(n! - floor((n!+1)/e)). - Gary Detlefs, Jul 11 2010
From Benedict W. J. Irwin, Jun 02 2016: (Start)
Let y(-1)=1, y(0)=1, and y(n) = (Sum_{k=0..n-1} y(k)+y(k-1))/n,
a(n) = (n-2)!*y(n-2).
(End)
a(n) = (Gamma(n+1,0)-exp(-1)*Gamma(n+1,-1))/(n-1). - Martin Clever, Mar 25 2023

Extensions

More terms from James Sellers, Jan 31 2000