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.

A068629 a(1) = 1. a(n) = n*a(n-1) if gcd(n,a(n-1)) = 1, a(n-1)/n if n divides a(n-1), otherwise a(n) = a(n-1).

This page as a plain text file.
%I A068629 #15 Oct 20 2019 01:55:54
%S A068629 1,2,6,6,30,5,35,280,2520,252,2772,231,3003,3003,3003,48048,816816,
%T A068629 816816,15519504,15519504,739024,33592,772616,772616,19315400,742900,
%U A068629 20058300,20058300,581690700,19389690,601080390,601080390
%N A068629 a(1) = 1. a(n) = n*a(n-1) if gcd(n,a(n-1)) = 1, a(n-1)/n if n divides a(n-1), otherwise a(n) = a(n-1).
%C A068629 The sequence can also be obtained by taking a(1) = 1 and then multiplying the previous term by n if n is coprime to the previous term a(n-1), dividing the previous term by n if n divides the previous term a(n-1), taking a(n) = a(n-1) if n is unrelated to a(n-1). - _Amarnath Murthy_, Oct 30 2002 (corrected by _Franklin T. Adams-Watters_, Dec 13 2006)
%H A068629 Ivan Neretin, <a href="/A068629/b068629.txt">Table of n, a(n) for n = 1..1000</a>
%t A068629 a = {1}; Do[AppendTo[a, If[GCD[a[[-1]], n] == 1, a[[-1]]*n, If[Divisible[a[[-1]], n], a[[-1]]/n, a[[-1]]]]], {n, 2, 32}]; a (* _Ivan Neretin_, May 21 2015 *)
%o A068629 (PARI) print1(k=1); for(n=2,99, if(gcd(k,n)==1, k*=n, if(k%n==0, k/=n)); print1(", "k)) \\ _Charles R Greathouse IV_, May 21 2015
%Y A068629 Cf. A034386, A068626, A068627, A068628.
%K A068629 easy,nonn
%O A068629 1,2
%A A068629 _Amarnath Murthy_, Feb 26 2002
%E A068629 a(26)-a(32) corrected by _Ivan Neretin_, May 21 2015