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!.

This page as a plain text file.
%I A008338 #17 Jul 11 2018 04:33:21
%S A008338 1,1,2,12,288,34560,48,241920,6,2177280,7900913664000,
%T A008338 315379190543155200000,658409472000,4099929477061017600000,
%U A008338 47029248000,61498942155915264000000,2939328000,1045482016650559488000000,163296000
%N A008338 a(n+1) = a(n)/n! if n! divides a(n) else a(n)*n!.
%H A008338 Harvey P. Dale, <a href="/A008338/b008338.txt">Table of n, a(n) for n = 1..190</a>
%H A008338 R. K. Guy and R. J. Nowakowski, <a href="https://www.jstor.org/stable/2975272">Monthly unsolved problems</a>, 1969-1995, Amer. Math. Monthly, 102 (1995), 921-926.
%p A008338 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;
%t A008338 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 *)
%t A008338 Transpose[NestList[{First[#]+1,If[Divisible[Last[#],First[#]!], Last[#]/First[#]!, Last[#]First[#]!]}&,{1,1},20]][[2]] (* _Harvey P. Dale_, Oct 24 2011 *)
%K A008338 nonn,easy,nice
%O A008338 1,3
%A A008338 _N. J. A. Sloane_
%E A008338 More terms from _Stefan Steinerberger_, Apr 08 2006