OFFSET
2
LINKS
Chittaranjan Pardeshi, Python program
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
KEYWORD
AUTHOR
Chittaranjan Pardeshi, Mar 27 2022
STATUS
approved