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.

A008338 a(n+1) = a(n)/n! if n! divides a(n) else a(n)*n!.

Original entry on oeis.org

1, 1, 2, 12, 288, 34560, 48, 241920, 6, 2177280, 7900913664000, 315379190543155200000, 658409472000, 4099929477061017600000, 47029248000, 61498942155915264000000, 2939328000, 1045482016650559488000000, 163296000
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    A008338 := proc(n) option remember; if n = 1 then 1 elif A008338(n-1) mod (n-1)! = 0 then A008338(n-1)/(n-1)! else A008338(n-1)*(n-1)!; fi; end;
  • Mathematica
    a[1] := 1; a[n_] := If[IntegerQ[a[n - 1]/(n - 1)! ], a[n - 1]/(n - 1)!, a[n - 1]*(n - 1)! ]; Table[a[n], {n, 1, 20}] (* Stefan Steinerberger, Apr 08 2006 *)
    Transpose[NestList[{First[#]+1,If[Divisible[Last[#],First[#]!], Last[#]/First[#]!, Last[#]First[#]!]}&,{1,1},20]][[2]] (* Harvey P. Dale, Oct 24 2011 *)

Extensions

More terms from Stefan Steinerberger, Apr 08 2006