OFFSET
1,3
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
FORMULA
If n = Product p(k)^e(k) then a(n) = Product [ (p(k)+1)/2 ]^e(k).
Multiplicative with a(p^e) = [(p+1)/2]^e. - David W. Wilson, Aug 01 2001
a(n) = 1 iff n is a power of 2 (A000079). - Michel Marcus, Nov 16 2017
MATHEMATICA
f[p_, e_] := Floor[(p+1)/2]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 03 2023 *)
PROG
(PARI) { A003960(n) = my(f); f=factor(n/2^valuation(n, 2)); prod(i=1, matsize(f)[1], ((f[i, 1]+1)/2)^f[i, 2] ); } \\ Max Alekseyev, Jul 27 2017
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
STATUS
approved