OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
f[p_, e_] := 1 + (p^If[OddQ[e], e+2, e+1] - p)/(p^2 - 1); s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; s /@ Select[Range[200], AllTrue[FactorInteger[#][[;; , 2]], OddQ] &]
(* or *)
f[p_, e_] := If[OddQ[e], 1 + (p^(e + 2) - p)/(p^2 - 1), 0]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Select[Array[s, 200], # > 0 &]
PROG
(PARI) lista(kmax) = {my(f, s, p, e); for(k = 1, kmax, f = factor(k); s = prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; if(e%2, 1 + (p^(e+2) - p)/(p^2 - 1), 0)); if(s > 0, print1(s, ", "))); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Dec 26 2023
STATUS
approved