login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270885 Irregular triangle read by rows, listing the digits 1,0,-1 in the representation of n > 0 in the binary balanced system (cf. comment in A268411). 6
1, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 0, 1, -1, 1, -1, 1, 0, -1, 0, 1, 0, 0, -1, 1, -1, 0, 0, 0, 1, -1, 0, 1, -1, 1, -1, 1, -1, 0, 1, -1, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, -1, 0, 0, 0, 0, 1, -1, 0, 0, 1, -1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, 0, -1, 1, -1, 1, -1, 0, 0, 1, -1, 1, -1, 1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

The n-th row contains k pairs of 1,-1 if and only if the number of runs of 1's in the binary representation of n is k.

All row sums are equal to 0.

Ignoring zero terms, we obtain an alternating sequence of 1,-1 (A033999).

Sequence of numbers having no 0's in the binary balanced system is A002450.

Minimal number having n >= 0 zeros in the binary balanced system is A000079(n).

LINKS

David A. Corneth, Table of n, a(n) for n = 1..10020 (first 1003 rows flattened)

David A. Corneth, n, row(n); Representation of n in the binary balanced system for n = 1..1003

Vladimir Shevelev, Two analogs of Thue-Morse sequence, arXiv:1603.04434 [math.NT], 2016.

EXAMPLE

Let n = 7 = 2^2 + 2 + 1. To convert this to the binary balanced system, every 2^i should be written in the form 2^(i+1) - 2^i.

Then 7 = 2^3 - 2^2 + 2^2 - 2^1 + 2^1 - 1 = 2^3 - 1 = 100-1_b.

In the binary balanced system we have the representations (irregular triangle)

   1 = {1,-1}

   2 = {1,-1,0}

   3 = {1,0,-1}

   4 = {1,-1,0,0}

   5 = {1,-1,1,-1}

   6 = {1,0,-1,0}

   7 = {1,0,0,-1}

   8 = {1,-1,0,0,0}

   9 = {1,-1,0,1,-1}

  10 = {1,-1,1,-1,0}

  ...

MATHEMATICA

Array[Plus @@ {PadRight[#, Length[#] + 1], -PadLeft[#, Length[#] + 1]} &@ IntegerDigits[#, 2] &, {21}] // Flatten (* Michael De Vlieger, Mar 25 2016 *)

PROG

(PARI) row(n) = {b=concat(0, binary(n)); for(i=2, #b, if(b[i] == 1, b[i-1] += 1; b[i] = -1)); b}

first(n) = {my(t = 0, i = 1); while(t < n, t+=(logint(i<<1, 2) + 1); i++); concat(vector(i, j, row(j)))} \\ David A. Corneth, Jan 21 2019

CROSSREFS

Cf. A000079, A002450, A033999, A039724, A140267, A268411.

Sequence in context: A065333 A244611 A189289 * A127972 A103451 A103452

Adjacent sequences:  A270882 A270883 A270884 * A270886 A270887 A270888

KEYWORD

sign,base,tabf

AUTHOR

Vladimir Shevelev, Mar 25 2016

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 January 24 16:34 EST 2020. Contains 331207 sequences. (Running on oeis4.)