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.

A160505 a(1)=1, a(n) = p*a(n-1), where p is the smallest prime satisfying gcd(n,p)=1.

Original entry on oeis.org

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

Views

Author

Masahiko Shin, May 16 2009

Keywords

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 *)