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.

Showing 1-3 of 3 results.

A353986 Numbers k such that Fibonacci(k) and Fibonacci(k+1) have the same binary weight (A000120).

Original entry on oeis.org

1, 2, 4, 7, 24, 27, 49, 51, 52, 69, 75, 114, 130, 131, 158, 169, 186, 217, 250, 263, 292, 335, 340, 345, 374, 474, 500, 507, 520, 547, 565, 583, 600, 604, 627, 717, 760, 791, 828, 831, 908, 996, 997, 1011, 1023, 1061, 1081, 1114, 1242, 1641, 1660, 1763, 1780
Offset: 1

Views

Author

Amiram Eldar, May 13 2022

Keywords

Comments

Numbers k such that A011373(k) = A011373(k+1).
The corresponding values of A011373(k) are 1, 1, 2, 3, 6, 11, 18, 17, 17, 23, 23, 43, 42, 42, 51, ...

Examples

			1 is a term since A011373(1) = A011373(2) = 1.
4 is a term since A011373(4) = A011373(5) = 2.
		

Crossrefs

A353987 is a subsequence.

Programs

  • Mathematica
    s[n_] := s[n] = DigitCount[Fibonacci[n], 2, 1]; Select[Range[2000], s[#] == s[# + 1] &]
  • PARI
    isok(k) = hammingweight(fibonacci(k)) == hammingweight(fibonacci(k+1)); \\ Michel Marcus, May 13 2022
    
  • Python
    from itertools import islice
    def A353986_gen(): # generator of terms
            a, b, k, ah = 1, 1, 1, 1
            while True:
                if ah == (bh := b.bit_count()):
                    yield k
                a, b, ah = b, a+b, bh
                k += 1
    A353986_list = list(islice(A353986_gen(),30)) # Chai Wah Wu, May 13 2022

A354301 Numbers k such that k!, (k+1)! and (k+2)! have the same binary weight (A000120).

Original entry on oeis.org

0, 7, 12, 262, 12887667
Offset: 1

Views

Author

Amiram Eldar, May 23 2022

Keywords

Comments

Numbers k such that A079584(k) = A079584(k+1) = A079584(k+2).
The corresponding values of A079584(k) are 1, 6, 12, 747, 136453086, ...

Examples

			7 is a term since A079584(7) = A079584(8) = A079584(9) = 6.
12 is a term since A079584(12) = A079584(13) = A079584(14) = 12.
		

Crossrefs

Subsequence of A354300.

Programs

  • Mathematica
    s[n_] := s[n] = DigitCount[n!, 2, 1]; Select[Range[0, 300], s[#] == s[# + 1] == s[# + 2] &]
  • Python
    from itertools import count, islice
    def wt(n): return bin(n).count("1")
    def agen(): # generator of terms
        n, fn, fn1, fn2, wtn, wtn1, wtn2 = 0, 1, 1, 2, 1, 1, 1
        for n in count(0):
            if wtn == wtn1 == wtn2: yield n
            fn, fn1, fn2 = fn1, fn2, fn2*(n+3)
            wtn, wtn1, wtn2 = wtn1, wtn2, wt(fn2)
    print(list(islice(agen(), 4))) # Michael S. Branicky, May 23 2022

A374961 Numbers k such that 2^k, 2^(k+1) and 2^(k+2) have the same number of terms in their Zeckendorf representation (A007895).

Original entry on oeis.org

5, 6, 1931, 4127, 26584
Offset: 1

Views

Author

Amiram Eldar, Jul 25 2024

Keywords

Comments

Numbers k such that A020908(k) = A020908(k+1) = A020908(k+2).
The corresponding values of A020908(k) are 3, 3, 763, 1660, 10596, ... .
a(6) > 10^5, if it exists.

Examples

			5 is a term since A020908(5) = A020908(6) = A020908(7) = 3.
763 is a term since A020908(1931) = A020908(1932) = A020908(1933) = 763.
		

Crossrefs

Subsequence of A374960.

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    s[n_] := s[n] = z[2^n]; Select[Range[0, 4200], s[#] == s[# + 1] == s[# + 2] &]
  • PARI
    A007895(n)=if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s); \\ Charles R Greathouse IV at A007895
    lista(kmax) = {my(z1 = A007895(1), z2 = A007895(2), z3); for(k = 2, kmax, z3 = A007895(2^k); if(z1 == z2 && z2 == z3, print1(k-2 , ", ")); z1 = z2; z2 = z3);}
Showing 1-3 of 3 results.