A365332 The sum of divisors of the largest square dividing n.
1, 1, 1, 7, 1, 1, 1, 7, 13, 1, 1, 7, 1, 1, 1, 31, 1, 13, 1, 7, 1, 1, 1, 7, 31, 1, 13, 7, 1, 1, 1, 31, 1, 1, 1, 91, 1, 1, 1, 7, 1, 1, 1, 7, 13, 1, 1, 31, 57, 31, 1, 7, 1, 13, 1, 7, 1, 1, 1, 7, 1, 1, 13, 127, 1, 1, 1, 7, 1, 1, 1, 91, 1, 1, 31, 7, 1, 1, 1, 31, 121
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[p_, e_] := (p^(e + 1 - Mod[e, 2]) - 1)/(p - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n)); prod(i = 1, #f~, (f[i,1]^(f[i,2] + 1 - f[i,2]%2) - 1)/(f[i,1] - 1));}
Comments