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!)
A330904 Numbers m such that the number of 1's in the binary expansion of m equals the sum of the balanced ternary trits of m. 3
0, 1, 10, 12, 13, 34, 36, 37, 66, 67, 120, 121, 192, 193, 202, 264, 265, 272, 273, 282, 283, 354, 355, 360, 361, 514, 516, 517, 520, 526, 544, 576, 577, 688, 840, 841, 848, 849, 904, 928, 1026, 1027, 1028, 1029, 1032, 1033, 1038, 1039, 1062, 1063, 1074, 1075 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
If a(n) mod 6 = 0, then a(n+1) = a(n)+1.
a(41) = 1026, a(42) = 1027, a(43) = 1028 and a(44) = 1029 is the first time that four consecutive numbers appear in a(n). Conjecture: There is no occurrence of five or more consecutive numbers in a(n). Tested by exhaustive search up to 3^30. - Thomas König, Jul 19 2020
LINKS
Thomas König, C program
FORMULA
Integers m such that A065363(m) = A000120(m).
EXAMPLE
34_10 = 11T1_bt = 10010_2, the sum of the digits is 1+1-1+1 = 2 for balanced ternary and 1+1 = 2 for base 2, so 34 is a term.
PROG
(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
isok(m) = bt(m) == hammingweight(m); \\ Michel Marcus, Jun 07 2020
CROSSREFS
Aside from the first term, subsequence of A174659.
Sequence in context: A219956 A331276 A230597 * A124867 A199991 A161598
KEYWORD
nonn,base
AUTHOR
Thomas König, May 02 2020
EXTENSIONS
Offset corrected by Thomas König, Jul 09 2020
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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)