[go: up one dir, main page]

login
A088304
a(1) = 1. For n > 1, a(n) = a(n-1) if n is prime, a(n) = a(n-1)/n if n is composite and divides a(n-1) else a(n) = n*a(n-1).
1
1, 1, 1, 4, 4, 24, 24, 3, 27, 270, 270, 3240, 3240, 45360, 3024, 189, 189, 3402, 3402, 68040, 3240, 71280, 71280, 2970, 74250, 1930500, 71500, 2002000, 2002000, 60060000, 60060000, 1876875, 56875, 1933750, 55250, 1989000, 1989000, 75582000
OFFSET
1,4
LINKS
MATHEMATICA
nxt[{n_, a_}]:={n+1, Which[PrimeQ[n+1], a, CompositeQ[n+1]&&Divisible[ a, n+1], a/(n+1), True, a(n+1)]}; NestList[nxt, {1, 1}, 40][[All, 2]] (* Harvey P. Dale, Nov 18 2020 *)
PROG
(PARI) b=1; for(n=2, 39, if(isprime(n), a=b, if(b%n==0, a=b/n, a=n*b)); print1(b, ", "); b=a)
CROSSREFS
Sequence in context: A271155 A271132 A270456 * A131978 A049614 A269186
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 01 2003
EXTENSIONS
Extended by Klaus Brockhaus and Ray Chandler, Oct 06 2003
STATUS
approved