OFFSET
1,2
COMMENTS
EXAMPLE
MATHEMATICA
s[n_] := s[n] = DigitCount[Fibonacci[n], 2, 1]; Select[Range[10^4], s[#] == s[# + 1] == s[# + 2] &]
PROG
(PARI) hf(k) = hammingweight(fibonacci(k)); \\ A011373
isok(k) = my(h=hf(k)); (h == hf(k+1)) && (h == hf(k+2)); \\ Michel Marcus, May 13 2022
(Python 3.10+)
# if Python version < 3.10, replace c.bit_count() with bin(c).count('1')
from itertools import islice
def A353987_gen(): # generator of terms
b, c, k, ah, bh = 1, 2, 1, 1, 1
while True:
if ah == (ch := c.bit_count()) == bh:
yield k
b, c, ah, bh = c, b+c, bh, ch
k += 1
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, May 13 2022
EXTENSIONS
a(11) from Dennis Yurichev, Jul 10 2024
STATUS
approved