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.

A094302 a(1) = 1; if n > a(n-1) then a(n) = n*a(n-1) else a(n) = least integer multiple of a(n-1)/n.

Original entry on oeis.org

1, 2, 6, 3, 15, 5, 35, 35, 35, 7, 77, 77, 77, 11, 165, 165, 165, 55, 55, 11, 231, 21, 483, 161, 161, 161, 161, 23, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 29, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363
Offset: 1

Views

Author

Amarnath Murthy, Apr 29 2004

Keywords

Examples

			a(16) = 165, 17 < 165, so a(17) = (least integer multiple of 165/17) = 165.
		

Crossrefs

Programs

  • Mathematica
    FoldList[If[#2 > #1, #1*#2, Numerator[#1/#2]] &, 1, Range[2, 56]] (* Ivan Neretin, Mar 21 2018 *)
  • PARI
    q=1;for(n=2,57,print1(q,",");q=if(n>q,q*n,q/gcd(q,n)))

Extensions

Edited by Klaus Brockhaus, May 02 2004