A160505 a(1)=1, a(n) = p*a(n-1), where p is the smallest prime satisfying gcd(n,p)=1.
1, 3, 6, 18, 36, 180, 360, 1080, 2160, 6480, 12960, 64800, 129600, 388800, 777600, 2332800, 4665600, 23328000, 46656000, 139968000, 279936000, 839808000, 1679616000, 8398080000, 16796160000, 50388480000, 100776960000
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A053669.
Programs
-
Maple
A053669 := proc(n) local i,p ; for i from 1 do p := ithprime(i) ; if igcd(n,p) = 1 then return p; end if; end do: end proc: A160505 := proc(n) option remember; if n = 1 then 1; else procname(n-1)*A053669(n) ; end if; end proc: # R. J. Mathar, Jul 06 2011
-
Mathematica
sp[{n_,a_}]:=Module[{p=2},While[GCD[n+1,p]!=1,p=NextPrime[p]];{n+1,a*p}]; NestList[sp,{1,1},30][[All,2]] (* Harvey P. Dale, May 08 2021 *)