Population count: Difference between revisions

Content added Content deleted
m (Updated description and link for Fōrmulæ solution)
Line 2,427: Line 2,427:


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>popcount[n_Integer] := IntegerDigits[n, 2] // Total
<lang Mathematica>popcount[n_Integer] := IntegerDigits[n, 2] // Total
Print["population count of powers of 3"]
Print["population count of powers of 3"]