login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
4
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,2
LINKS
EXAMPLE
a(16) = 165, 17 < 165, so a(17) = (least integer multiple of 165/17) = 165.
MATHEMATICA
FoldList[If[#2 > #1, #1*#2, Numerator[#1/#2]] &, 1, Range[2, 56]] (* Ivan Neretin, Mar 21 2018 *)
PROG
(PARI) q=1; for(n=2, 57, print1(q, ", "); q=if(n>q, q*n, q/gcd(q, n)))
CROSSREFS
Sequence in context: A303762 A303778 A094426 * A094300 A055773 A111866
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 29 2004
EXTENSIONS
Edited by Klaus Brockhaus, May 02 2004
STATUS
approved