Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A036461 Number of 1 digits in base 3 representation of 2^n. 2
1, 0, 2, 0, 2, 2, 2, 2, 4, 0, 4, 2, 4, 2, 6, 4, 2, 4, 6, 2, 6, 4, 6, 4, 8, 2, 10, 4, 4, 8, 6, 8, 8, 8, 8, 6, 10, 8, 10, 10, 6, 6, 12, 8, 10, 14, 8, 10, 10, 12, 16, 8, 12, 18, 10, 10, 14, 10, 14, 14, 16, 10, 16, 12, 16, 16, 14, 16, 14, 18, 20, 12, 20, 10, 22, 12, 26, 8, 20, 12, 22, 14, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The number of 1's in the base 3 representation of any even(odd) number is even(odd).
LINKS
MAPLE
seq(numboccur(1, convert(2^n, base, 3)), n=0..100); # Robert Israel, Apr 04 2018
MATHEMATICA
Table[DigitCount[2^n, 3, 1], {n, 0, 120}] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(PARI) a(n) = #select(x->(x==1), digits(2^n, 3)); \\ Michel Marcus, Apr 04 2018
CROSSREFS
Cf. A020915 (number of digits), A104320 (number of 0's), A260683 (number of 2's).
Sequence in context: A044950 A161872 A278248 * A244478 A261153 A374078
KEYWORD
base,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 23:05 EDT 2024. Contains 375284 sequences. (Running on oeis4.)