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

Original entry on oeis.org

1, 2, 6, 30, 5, 20, 140, 1260, 126, 1386, 18018, 1287, 10296, 858, 14586, 277134, 12597, 201552, 4635696, 193154, 2897310, 111435, 3120180, 156009, 7429, 133722, 3343050, 96948450, 3231615, 100180065, 3205762080, 94287120, 3488623440, 91805880, 2295147
Offset: 1

Views

Author

Rémy Sigrist, Dec 22 2019

Keywords

Comments

This sequence has similarities with A008336.

Examples

			The first terms, alongside the corresponding A330647(n), are:
  n   a(n)  A330647(n)
  --  ----  ----------
   1     1           1
   2     2           2
   3     6           3
   4    30           5
   5     5           6
   6    20           4
   7   140           7
   8  1260           9
   9   126          10
  10  1386          11
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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", "))