login
A354321
Digit above the least significant 01 digit pair in the Zeckendorf representation of n.
2
0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1
OFFSET
1
COMMENTS
The Zeckendorf representation of n, as digits, is A189920 or A014417 and when n = "... d 01 00..00", a(n) = d.
If n is a Fibonacci number (A000045) then n = 1 00..00 and initial 0 digits are understood so that a(n) = 0.
Fibbinary (A003714) encodes Zeckendorf digits in bits and there a(n) is the bit two places above the least significant 1-bit, so a(n) = A086483(A003714(n)).
This sequence is morphic since it can be formed from the fixed point of a morphism (of 7 symbols) by a symbol-to-symbol mapping.
The formulas below using mod phi work since the possible least significant 3 digits fall into disjoint ranges mod phi (since higher terms are Fibonacci(k) == (-1/phi)^(k-1) (mod phi)).
FORMULA
a(n) = 1 if r < 2*phi-3, or a(n) = 0 if 2*phi-3 <= r < phi-1, or otherwise a(n) = a(q), where quotient q = floor((n+1)/phi) = A005206(n), remainder r = n+1 mod phi, and phi = (1+sqrt(5))/2 = A001622 is the golden ratio.
a(n) = 1 iff A348853(n)+1 mod phi < 2*phi-3, where A348853 is the Zeckendorf "odd" part and the inequality identifies it ending "...101".
a(n) = 0 if n is a Fibonacci number; otherwise a(n) = 1 if n is a Lucas number (A000032); otherwise a(n) = a(A066628(n)) where A066628 discards the most significant Zeckendorf digit.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/phi^2 (A132338). - Amiram Eldar, Feb 17 2024
EXAMPLE
n = 107 = 1000 1 01 000 in Zeckendorf digits
^--- a(107) = 1
PROG
(PARI) { my(phi=quadgen(5), s=phi-1, c=2*phi-3);
a(n) = my(r); until(r<s, [n, r]=divrem(n+1, phi)); r<c; }
CROSSREFS
Cf. A189920 and A014417 (Zeckendorf digits), A348853 (odd part).
Cf. A003714 (Fibbinary), A086483.
Cf. A038189 (similar binary).
Sequence in context: A354982 A020987 A288372 * A072786 A320926 A144597
KEYWORD
nonn,easy
AUTHOR
Kevin Ryde, May 29 2022
STATUS
approved