A011754 Number of ones in the binary expansion of 3^n.
1, 2, 2, 4, 3, 6, 6, 5, 6, 8, 9, 13, 10, 11, 14, 15, 11, 14, 14, 17, 17, 20, 19, 22, 16, 18, 24, 30, 25, 25, 25, 26, 26, 34, 29, 32, 27, 34, 36, 32, 28, 39, 38, 39, 34, 34, 45, 38, 41, 33, 41, 46, 42, 35, 39, 42, 39, 40, 42, 48, 56, 56, 49, 57, 56, 51, 45, 47, 55, 55, 64, 68, 58
Offset: 0
References
- S. Wolfram, "A new kind of science", p. 903.
Links
- Hugo Pfoertner, Table of n, a(n) for n = 0..10000 (terms 0..1000 from T. D. Noe)
- Vassil S. Dimitrov and Everett W. Howe, Powers of 3 with few nonzero bits and a conjecture of Erdős, arXiv:2105.06440 [math.NT], 2021.
- Taylor Dupuy and David E. Weirich, Bits of 3^n in binary, Wieferich primes and a conjecture of Erdős, Journal of Number Theory, Volume 158, January 2016, Pages 268-280.
- Hugo Pfoertner, Plot of a(n) - 0.79248*n, +-Pi*sqrt(n), n up to 10^6.
- H. G. Senge and E. G. Straus, PV-numbers and sets of multiplicity, Periodica Mathematica Hungarica 3 (1973), pp. 93-100.
Crossrefs
Programs
-
Haskell
a011754 = a000120 . a000244 -- Reinhard Zumkeller, Aug 14 2015
-
Magma
[&+Intseq(3^n, 2): n in [0..79]]; // Vincenzo Librandi, Nov 28 2018
-
Maple
f:= n -> convert(convert(3^n,base,2),`+`): map(f, [$0..100]); # Robert Israel, Apr 17 2024
-
Mathematica
Table[DigitCount[3^n, 2][[1]], {n, 0, 100}] (* Stefan Steinerberger, Apr 03 2006 *) DigitCount[3^Range[0,100],2,1] (* Harvey P. Dale, Apr 06 2012 *)
-
PARI
a(n)=hammingweight(3^n) \\ Charles R Greathouse IV, Feb 09 2017
-
Python
A011754 = lambda n: (3**n).bit_count() # M. F. Hasler, Apr 17 2024
Formula
a(n) = A000120(3^n). - Benoit Cloitre, Dec 06 2002
Extensions
More terms from Stefan Steinerberger, Apr 03 2006
Comments