cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A353987 Numbers k such that F(k), F(k+1) and F(k+2) have the same binary weight (A000120), where F(k) is the k-th Fibonacci number (A000045).

Original entry on oeis.org

1, 51, 130, 996, 3224, 4287, 9951, 12676, 72004, 53812945, 141422620
Offset: 1

Views

Author

Amiram Eldar, May 13 2022

Keywords

Comments

Numbers k such that A011373(k) = A011373(k+1) = A011373(k+2).
The corresponding values of A011373(k) are 1, 17, 42, 354, 1110, 1490, 3451, 4383, 24988, 18678035, ...

Examples

			1 is a term since A011373(1) = A011373(2) = A011373(3) = 1.
51 is a term since A011373(51) = A011373(52) = A011373(53) = 17.
		

Crossrefs

Subsequence of A353986.

Programs

  • Mathematica
    s[n_] := s[n] = DigitCount[Fibonacci[n], 2, 1]; Select[Range[10^4], s[#] == s[# + 1] == s[# + 2] &]
  • 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
    # 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
    A353987_list = list(islice(A353987_gen(),7)) # Chai Wah Wu, May 14 2022

Extensions

a(11) from Dennis Yurichev, Jul 10 2024