|
|
A352677
|
|
Binary expansion of largest number whose expansions in base 2 and in base phi = (1+sqrt(5))/2 are identical.
|
|
2
|
|
|
1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2
|
|
LINKS
|
|
|
FORMULA
|
a(2)*phi + a(1) + a(0)/phi + ... + a(n)/phi^(1-n) + ... = a(2)*2 + a(1) + a(0)/2 + ... + a(n)/2^(1-n) + ....
A binary identical number is a number which shares the same digits in two different bases, b1 and b2, where 1 < b1 < b2 <= 2.
Here b2 = 2 and b1 = phi and initial digits "11." are the largest possible.
Algorithm:
1. set s1 = b1+1
2. set s2 = b2+1
3. output 1,1 # two digits above radix point
4. set i = 0
5. while s1 < s2:
6. i = i - 1
7. if s1 + b1^i <= s2 + b2^i:
8. s1 += b1^i
9. s2 += b2^i
10. output 1
11. else:
12. output 0
|
|
EXAMPLE
|
11.11100001000100010100100010101000000010..., which in both binary and base phi is decimal 3.87916998...
|
|
PROG
|
(PARI)
f(b1, b2, len) = {
my(d=0, c);
vector(len, i,
if((c=d+b1^(2-i)-b2^(2-i)) <= 0,
d = c;
1,
0))
};
print(f(quadgen(5), 2, 1000));
|
|
CROSSREFS
|
Cf. A355328 (decimal + 1/2 = binary).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|