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.

A330648 a(1) = 1 and for any n > 1, if A330647(n) divides a(n-1) then a(n) = a(n-1) / A330647(n), otherwise a(n) = a(n-1) * A330647(n).

This page as a plain text file.
%I A330648 #12 Dec 26 2019 05:35:20
%S A330648 1,2,6,30,5,20,140,1260,126,1386,18018,1287,10296,858,14586,277134,
%T A330648 12597,201552,4635696,193154,2897310,111435,3120180,156009,7429,
%U A330648 133722,3343050,96948450,3231615,100180065,3205762080,94287120,3488623440,91805880,2295147
%N A330648 a(1) = 1 and for any n > 1, if A330647(n) divides a(n-1) then a(n) = a(n-1) / A330647(n), otherwise a(n) = a(n-1) * A330647(n).
%C A330648 This sequence has similarities with A008336.
%H A330648 Rémy Sigrist, <a href="/A330648/b330648.txt">Table of n, a(n) for n = 1..1000</a>
%e A330648 The first terms, alongside the corresponding A330647(n), are:
%e A330648   n   a(n)  A330647(n)
%e A330648   --  ----  ----------
%e A330648    1     1           1
%e A330648    2     2           2
%e A330648    3     6           3
%e A330648    4    30           5
%e A330648    5     5           6
%e A330648    6    20           4
%e A330648    7   140           7
%e A330648    8  1260           9
%e A330648    9   126          10
%e A330648   10  1386          11
%t A330648 Nest[Append[#1, Block[{k = 2, s}, While[Nand[FreeQ[#1[[All, 1]], k], MemberQ[{1, k}, Set[s, GCD[#3, k]]]], k++]; {k, If[s == 1, #3 k, #3/k], If[Mod[#3, k] == 0, #3/k, #3 k]}]] & @@ {#, #[[-1, 1]], #[[-1, 2]], #[[-1, -1]]} &, {{1, 1, 1}}, 34][[All, -1]] (* _Michael De Vlieger_, Dec 23 2019 *)
%o A330648 (PARI) x=1; s=0; for (n=1, 35, for (v=1, oo, if (!bittest(s,v), if (gcd(x,v)==1, s+=2^v; x*=v; break, x%v==0, s+=2^v; x/=v; break))); print1 (x", "))
%Y A330648 Cf. A008336, A330647.
%K A330648 nonn
%O A330648 1,2
%A A330648 _Rémy Sigrist_, Dec 22 2019