A162599 Sum of digits (bits) in base two representation of 3^(2^n).
2, 2, 3, 6, 11, 26, 56, 97, 204, 415, 769, 1606, 3268, 6460, 12889, 25915, 52046, 104099, 207000, 416542, 831430, 1662247, 3324374, 6646337, 13292865, 26593542, 53182276, 106364450, 212732814, 425465107, 850887793, 1701801109
Offset: 0
Examples
3^(2^2) = 81 = 64 + 16 + 1, so a(2) = 3.
Programs
-
Maple
a := proc (n) local b2: b2 := convert(3^(2^n), base, 2): add(b2[j], j = 1 .. nops(b2)) end proc: seq(a(n), n = 0 .. 20); # Emeric Deutsch, Jul 21 2009
-
Mathematica
Table[Total[IntegerDigits[3^2^n,2]],{n,0,25}] (* The program generates the first 26 terms of the seequence. *) (* Harvey P. Dale, Jun 16 2024 *)
-
PARI
a(n) = hammingweight(3^(2^n)); \\ Michel Marcus, Mar 03 2019
Extensions
Extended by Emeric Deutsch, Jul 21 2009
More terms from Michel Marcus, Mar 03 2019
Comments