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.

A076041 a(n) = n! for n < 4; else a(n) = floor(P(n-1)/n) where P(n) = a(1) * a(2) * ... * a(n).

Original entry on oeis.org

1, 2, 6, 3, 7, 42, 1512, 2000376, 3556892570112, 11386336279786153952123289, 117862412614885811248635740101130996768076206774085
Offset: 1

Views

Author

Amarnath Murthy, Oct 29 2002

Keywords

Comments

Original definition: a(1)=1, a(n)=n*P(n-1) if P(n-1) < n, a(n) = floor(P(n-1)/n) if n <= P(n-1), where P(n-1) = a(1) * a(2) * ... * a(n-1).
Next term a(12) = 1273391928...9197035520 ~ 1.27*10^100 has 101 digits. - M. F. Hasler, Oct 21 2014

Examples

			a(4) = floor(1*2*6/4) = 3.
a(5) = floor(1*2*6*3/5) = floor(36/5) = 7.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; p[n_] := Product[a[k], {k, 1, n}]; a[n_ /; p[n-1] < n] := a[n] = n*p[n-1]; a[n_ /; n < p[n-1]] := a[n] = Floor[p[n-1]/n]; Table[a[n], {n, 1, 12}] (* Jean-François Alcover, Jul 22 2013 *)
  • PARI
    a(n)=if(n<4,n!,P=3!;for(i=3,n-1,P*=P\i);P\n) \\ M. F. Hasler, Oct 21 2014

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
Edited by M. F. Hasler, Oct 21 2014