login
A360034
Binary representation of -n in base i-1.
1
0, 11101, 11100, 10001, 10000, 11001101, 11001100, 11000001, 11000000, 11011101, 11011100, 11010001, 11010000, 1110100001101, 1110100001100, 1110100000001, 1110100000000, 1110100011101, 1110100011100, 1110100010001, 1110100010000, 1110111001101, 1110111001100, 1110111000001
OFFSET
0,2
COMMENTS
Note that each Gaussian integer has one and only one base-(i-1) representation.
Also binary representation of -n in base -1-i.
Write out -n in base -4 (A212526), then change each digit 0, 1, 2, 3 to 0000, 0001, 1100, 1101 respectively.
FORMULA
For n >= 1, a(4*n-0..3) = 10000 * A271472(n) + 0, 1, 1100, 1101 respectively.
EXAMPLE
a(1) = 11101 since -1 = (i-1)^4 + (i-1)^3 + (i-1)^2 + (i-1)^0. Also, the base-(-4) representation of -1 is 13_(-4), so changing 1 to 0001 and 3 to 1101 yields 11101.
a(5) = 11001101 since -5 = (i-1)^7 + (i-1)^6 + (i-1)^3 + (i-1)^2 + (i-1)^0. Also, the base-(-4) representation of -5 is 23_(-4), so changing 2 to 1100 and 3 to 1101 yields 11001101.
PROG
(PARI) a(n) = my(v = [-n, 0], x=0, digit=0, a, b); while(v!=[0, 0], a=v[1]; b=v[2]; v[1]=-2*(a\2)+b; v[2]=-(a\2); x+=(a%2)*10^digit; digit++); x \\ Jianing Song, Jan 22 2023; [a, b] represents the number a + b*(-1+i)
CROSSREFS
This is A256441 converted from base 10 to base 2. Cf. also A271472.
Sequence in context: A204226 A235440 A235405 * A158619 A367815 A094324
KEYWORD
nonn,base,easy
AUTHOR
Jianing Song, Jan 22 2023
STATUS
approved