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!)
A334765 Numbers m such that the numbers of 1's in the binary expansion of m equals the negative sum of balanced ternary trits of m. 2

%I #28 Sep 06 2020 22:06:09

%S 0,41,68,131,132,368,384,528,1095,1098,1100,1106,1112,1122,1124,1152,

%T 1176,1346,1824,2561,3282,3284,3336,3344,3392,3524,4098,4101,4104,

%U 4112,4118,4128,4172,4352,4496,4739,4740,5504,6224,9856,9857,9869,9896,9923,9924

%N Numbers m such that the numbers of 1's in the binary expansion of m equals the negative sum of balanced ternary trits of m.

%C a(116) = 32770, a(117) = 32771 and a(118) = 32772 is the first time that three consecutive numbers appear in this sequence. Conjecture: There is no occurrence of four or more consecutive numbers. Tested by exhaustive search up to a(n) = 3^26. - _Thomas König_, Jul 19 2020

%H Thomas König, <a href="/A334765/b334765.txt">Table of n, a(n) for n = 1..30000</a>

%F Integers m such that -A065363(m) = A000120(m).

%e 41_10 = 1TTTT_bt = 101001_2, the sum of the digits is 1-1-1-1-1 = -3 for balanced ternary and 1+1+1 = 3 for base 2, so 41 is a term.

%t Select[Range[0, 10^4], -Total@ If[First@ # == 0, Rest@ #, #] &[Prepend[IntegerDigits[#, 3], 0] //. {x___, y_, k_ /; k > 1, z___} :> {x, y + 1, -1, z}] == DigitCount[#, 2, 1] &] (* _Michael De Vlieger_, Jul 08 2020 *)

%o (PARI) bt(n)= if (n==0, return (0)); my(d=digits(n, 3), c=1); while(c, if(d[1]==2, d=concat(0, d)); c=0; for(i=2, #d, if(d[i]==2, d[i]=-1; d[i-1]+=1; c=1))); vecsum(d); \\ A065363

%o isok(m) = bt(m) + hammingweight(m) == 0; \\ _Michel Marcus_, Jun 07 2020

%Y Aside from the first term, subsequence of A174657.

%Y Cf. A000120, A037301, A065363, A330904.

%K base,nonn

%O 1,2

%A _Thomas König_, May 10 2020

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 May 11 17:16 EDT 2024. Contains 372410 sequences. (Running on oeis4.)