login
A133904
a(n) = gcd(a(n-1),n-1)*a(n-1) + d(n-1) if a(n-1) is not divisible by 2, otherwise a(n) = a(n-1)/2, where gcd denotes common divisor, d(n) is number of divisors of n.
1
1, 2, 1, 3, 6, 3, 13, 15, 19, 22, 11, 123, 375, 377, 381, 1147, 1152, 576, 288, 144, 72, 36, 18, 9, 35, 178, 89, 93, 99, 101, 109, 111, 117, 355, 359, 363, 1098, 549, 553, 557, 565, 567, 11915, 11917, 11923, 11929, 11933, 11935, 11945, 11948, 5974, 2987, 2993
OFFSET
1,2
LINKS
MATHEMATICA
Nest[Append[#1, If[EvenQ@ Last[#1], Last[#1]/2, GCD[Last[#1], #2]*Last[#1] + DivisorSigma[0, #2]]] & @@ {#, Length[#]} &, {1}, 52] (* Michael De Vlieger, Mar 20 2022 *)
PROG
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = if (va[n-1]%2, gcd(va[n-1], n-1)*va[n-1] + numdiv(n-1), va[n-1]/2); ); va; \\ Michel Marcus, Mar 21 2022
CROSSREFS
Sequence in context: A193897 A226122 A347297 * A245182 A209160 A371418
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Jan 07 2008
EXTENSIONS
Name and terms a(25) and following corrected by Jon E. Schoenfield, Mar 20 2022
STATUS
approved