login
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
66, 227, 903, 17574, 40102, 462260, 5930999
OFFSET
1,1
EXAMPLE
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}
Count of 1 = count of 2 = count of 0 = 14, so 66 is member
Occurrences of digits 0,1,2 in 2^n:
{n, {#0,#1,#2}}
{66,{14,14,14}}
{227,{48,48,48}}
{903,{190,190,190}}
{17574,{3696,3696,3696}}
{40102,{8434,8434,8434}}
{462260,{97218,97218,97218}}. [Willy Van den Driessche, Jul 21 2011]
MATHEMATICA
Do[If[DigitCount[2^n, 3, 0]==DigitCount[2^n, 3, 1]==DigitCount[2^n, 3, 2], Print[n]], {n, 1, 60000}]
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 *)
CROSSREFS
Sequence in context: A205817 A046393 A268582 * A322768 A158070 A242726
KEYWORD
nonn
AUTHOR
Mohammed Bouayoun (Mohammed.bouayoun(AT)sanef.com), Apr 24 2006
EXTENSIONS
a(6)=462260 added by Willy Van den Driessche, Jul 21 2011.
a(7) from Donovan Johnson, Jul 25 2011
STATUS
approved