login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260683 Number of 2's in the expansion of 2^n in base 3. 3
0, 1, 0, 2, 1, 1, 1, 2, 0, 4, 2, 4, 3, 3, 2, 6, 5, 5, 3, 7, 4, 7, 5, 4, 1, 5, 2, 8, 8, 7, 9, 9, 8, 7, 7, 8, 4, 6, 8, 9, 11, 11, 7, 11, 10, 8, 9, 8, 8, 10, 11, 16, 13, 10, 9, 12, 13, 16, 12, 13, 15, 15, 11, 15, 16, 14, 14, 12, 14, 15, 14, 16, 11, 18, 11, 17, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Erdős conjectures that a(n) > 0 for n > 8.

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, B33. [Does not seem to be in section B33.]

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = A020915(n) - A104320(n) - A036461(n). - Altug Alkan, Nov 15 2015

a(n) = A081603(A000079(n)). - Michel Marcus, Dec 03 2015

EXAMPLE

For n=5, the expansion of 2^n in number base 3 is 1012, thus: a(n)=1

For n=10, the expansion of 2^n in number base 3 is 1101221, thus: a(n)=2

MAPLE

seq(numboccur(2, convert(2^n, base, 3)), n=0..100); # Robert Israel, Nov 15 2015

MATHEMATICA

S={}; n=-1; While[n<150, n++; A=IntegerDigits[2^n, 3]; k=Count[A, 2]; AppendTo[S, k]]; S

PROG

(PARI) c(k, d, b) = {my(c=0, f); while (k>b-1, f=k-b*(k\b); if (f==d, c++); k\=b); if (k==d, c++); return(c)}

for(n=0, 300, print1(c(2^n, 2, 3)", ")) \\ Altug Alkan, Nov 15 2015

(PARI) a(n) = #select(x->(x==2), digits(2^n, 3)); \\ Michel Marcus, Nov 28 2018

(Perl) use ntheory ":all"; sub a260683 { scalar grep { $_==2 } todigits(vecprod((2) x shift), 3) } # Dana Jacobsen, Aug 16 2016

CROSSREFS

Cf. A004642 (2^n in base 3), A020915 (number of terms), A036461 (number of 1's), A104320 (number of 0's).

Cf. A000108 (conjecture that A000108(n) is 6m+1 only for n = 0, 1 and 5 follows from Erdős's one).

Sequence in context: A163819 A301734 A281185 * A092673 A243842 A112400

Adjacent sequences:  A260680 A260681 A260682 * A260684 A260685 A260686

KEYWORD

base,easy,nonn

AUTHOR

Emmanuel Vantieghem, Nov 15 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 19:32 EDT 2019. Contains 321330 sequences. (Running on oeis4.)