A192085 Number of ones in the binary expansion of n^3.
0, 1, 1, 4, 1, 6, 4, 6, 1, 6, 6, 6, 4, 5, 6, 8, 1, 6, 6, 8, 6, 6, 6, 9, 4, 7, 5, 8, 6, 9, 8, 10, 1, 6, 6, 11, 6, 10, 8, 12, 6, 8, 6, 9, 6, 11, 9, 10, 4, 9, 7, 7, 5, 8, 8, 10, 6, 10, 9, 7, 8, 11, 10, 12, 1, 6, 6, 11, 6, 9, 11, 11, 6, 13, 10, 14, 8, 13, 12, 13
Offset: 0
Links
Programs
-
Magma
[&+Intseq(n^3,2): n in [0..79]]; // Bruno Berselli, Jun 24 2011
-
Maple
A192085 := proc(n) return add(b,b=convert(n^3,base,2)): end: seq(A192085(n),n=0..100); # Nathaniel Johnston, Jun 23 2011
-
PARI
a(n)=hammingweight(n^3) \\ Charles R Greathouse IV, Sep 27 2016
-
Python
def A192085(n): return bin(n**3).count('1') # Chai Wah Wu, Sep 03 2014
Formula
a(n) = [x^(n^3)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018
Comments