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!)
A117306 Numbers n such that the counts of 0's, 1's and 2's are the same in the ternary expansion of 2^n. 0

%I #18 Aug 05 2021 16:48:47

%S 66,227,903,17574,40102,462260,5930999

%N Numbers n such that the counts of 0's, 1's and 2's are the same in the ternary expansion of 2^n.

%e 2^66 = {2, 0, 0, 0, 1, 2, 1, 2, 1, 0, 2, 1, 1, 2, 1, 0, 2, 1, 1, 2, 1, 0, 2, 1, 2, 2, 2, 1, 0, 0, 0, 2, 0, 0, 2, 0, 1, 0, 1, 2, 0, 1}

%e Count of 1 = count of 2 = count of 0 = 14, so 66 is member

%e Occurrences of digits 0,1,2 in 2^n:

%e {n, {#0,#1,#2}}

%e {66,{14,14,14}}

%e {227,{48,48,48}}

%e {903,{190,190,190}}

%e {17574,{3696,3696,3696}}

%e {40102,{8434,8434,8434}}

%e {462260,{97218,97218,97218}}. [_Willy Van den Driessche_, Jul 21 2011]

%t Do[If[DigitCount[2^n,3,0]==DigitCount[2^n,3,1]==DigitCount[2^n,3,2],Print[n]],{n,1,60000}]

%t Select[Range[41000],Length[Union[DigitCount[2^#,3,{0,1,2}]]]==1&] (* The program generates the first 5 terms of the sequence. To generate more, increase the Range constant, but the program may take a long time to run. *) (* _Harvey P. Dale_, Aug 05 2021 *)

%K nonn

%O 1,1

%A Mohammed Bouayoun (Mohammed.bouayoun(AT)sanef.com), Apr 24 2006

%E a(6)=462260 added by _Willy Van den Driessche_, Jul 21 2011.

%E a(7) from _Donovan Johnson_, Jul 25 2011

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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)