(MAGMAMagma) a:=[]; for k in [1..65] do if IsOdd(k) then a[k]:=(k * #Divisors(k) + DivisorSigma(1, k)) / 2; else a[k]:=(k * (#Divisors(k) - #Divisors(k div 2)) + DivisorSigma(1, k) - DivisorSigma(1, k div 2)) / 2; end if; end for; a; // Marius A. Burtea, Oct 07 2019