login
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).
2
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,2
COMMENTS
This sequence has similarities with A008336.
LINKS
EXAMPLE
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
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 *)
PROG
(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", "))
CROSSREFS
Sequence in context: A326900 A373350 A181812 * A354418 A074168 A079615
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 22 2019
STATUS
approved