OFFSET
1,3
COMMENTS
a(n)<n for n>1.
Multiplicative with a(p^e) = A000120(p)^e. - Mitch Harris, Apr 19 2005
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
Completely multiplicative with a(p) = number of 1's in binary representation of prime p.
Multiplicative with a(p^e) = A000120(p)^e
EXAMPLE
a(30) = a(2*3*5) = a(2)*a(3)*a(5) = 1*2*2 = 4,
as a(2)=a('10')=1, a(3)=a('11')= 2 and a(5)=a('101')=2.
MAPLE
A072084 := proc(n) local a, c; readlib(ifactors):
a := n -> add(i, i=convert(n, base, 2));
mul(a(c[1])^c[2], c=ifactors(n)[2]) end:
# Peter Luschny, Jan 16 2010
MATHEMATICA
a[n_] := Times @@ Power @@@ (FactorInteger[n] /. {p_Integer, e_} :> {DigitCount[p, 2, 1], e}); Array[a, 100] (* Jean-François Alcover, Feb 09 2018 *)
PROG
(Sage) A072084 = lambda n: prod(p.digits(base=2).count(1)**m for p, m in factor(n)) # D. S. McNeil, Jan 17 2011
(Haskell)
a072084 = product . map a000120 . a027746_row
-- Reinhard Zumkeller, Feb 10 2013
(PARI) a(n)=my(f=factor(n)); f[, 1]=apply(hammingweight, f[, 1]); factorback(f) \\ Charles R Greathouse IV, Aug 06 2015
CROSSREFS
KEYWORD
nonn,base,mult
AUTHOR
Reinhard Zumkeller, Jun 14 2002
STATUS
approved