login
A133902
a(n) = a(n-1)* d(n) if gcd(n,a(n-1))=1, otherwise a(n) = a(n-1)/gcd(n,a(n-1)). Here gcd(n,a(n-1)) is greatest common divisor, d(n) is number of divisors.
1
1, 1, 2, 4, 1, 2, 1, 2, 1, 3, 12, 24, 2, 4, 2, 8, 1, 2, 1, 2, 1, 4, 2, 4, 1, 3, 12, 4, 1, 2, 1, 2, 1, 4, 2, 8, 2, 4, 2, 8, 1, 2, 1, 2, 1, 6, 3, 6, 1, 3, 18, 6, 3, 6, 1, 4, 1, 4, 2, 4, 1, 2, 1, 6, 3, 12, 2, 4, 1, 4, 2, 4, 1, 2, 1, 6, 3, 12, 2, 4, 1, 5, 20, 40, 10, 2, 1, 4, 1, 2, 1, 4, 1, 4, 2, 8
OFFSET
0,3
LINKS
MAPLE
A[0]:= 1:
for n from 1 to 1000 do
g:= igcd(n, A[n-1]);
if g = 1 then A[n]:= A[n-1]*numtheory:-tau(n) else A[n]:= A[n-1]/g fi
od:
seq(A[i], i=0..1000); # Robert Israel, Aug 10 2020
MATHEMATICA
Nest[Append[#1, If[#3 == 1, Last[#1]*DivisorSigma[0, #2], Last[#1]/#3]] & @@ {#1, #2, GCD[Last[#1], #2]} & @@ {#, Length[#] + 1} &, {1, 1}, 93] (* Michael De Vlieger, Mar 21 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Jan 07 2008
EXTENSIONS
Corrected, extended and offset changed by Robert Israel, Aug 10 2020
STATUS
approved