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.

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

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

Original entry on oeis.org

0, 1, 3, 5, 7, 8, 12, 13, 15, 31, 63, 88, 127, 129, 131, 244, 255, 262, 263, 288, 300, 344, 511, 793, 914, 1012, 1023, 1045, 1116, 1196, 1538, 1549, 1565, 1652, 1817, 1931, 1989, 2047, 2067, 2096, 2459, 2548, 2862, 2918, 2961, 3372, 3478, 3540, 3588, 3673, 3707
Offset: 1

Views

Author

Amiram Eldar, May 23 2022

Keywords

Comments

Numbers k such that A079584(k) = A079584(k+1).
The corresponding values of A079584(k) are 1, 1, 2, 4, 6, 6, 12, 12, 18, 42, ...
This sequence is infinite as it contains A000225. - Rémy Sigrist, May 23 2022

Examples

			1 is a term since A079584(1) = A079584(2) = 1.
3 is a term since A079584(3) = A079584(4) = 2.
		

Crossrefs

A354301 is a subsequence.

Programs

  • Mathematica
    s[n_] := s[n] = DigitCount[n!, 2, 1]; Select[Range[0, 4000], s[#] == s[# + 1] &]
  • PARI
    isok(k) = hammingweight(k!) == hammingweight((k+1)!); \\ Michel Marcus, May 23 2022
  • Python
    from itertools import count, islice
    def wt(n): return bin(n).count("1")
    def agen(): # generator of terms
        n, fn, fnplus, wtn, wtnplus = 0, 1, 1, 1, 1
        for n in count(0):
            if wtn == wtnplus: yield n
            fn, fnplus = fnplus, fnplus*(n+2)
            wtn, wtnplus = wtnplus, wt(fnplus)
    print(list(islice(agen(), len(data)))) # Michael S. Branicky, May 23 2022
    

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

Original entry on oeis.org

0, 5, 6, 7, 11, 18, 20, 25, 39, 52, 61, 96, 104, 157, 176, 199, 206, 210, 279, 326, 333, 339, 369, 380, 397, 411, 426, 473, 542, 576, 743, 860, 898, 921, 961, 970, 993, 1024, 1043, 1049, 1100, 1121, 1176, 1184, 1193, 1199, 1206, 1230, 1253, 1376, 1380, 1387, 1435
Offset: 1

Views

Author

Amiram Eldar, Jul 25 2024

Keywords

Comments

Numbers k such that A020908(k) = A020908(k+1).
The corresponding values of A020908(k) are 1, 3, 3, 3, 6, 7, 8, 9, 18, 20, 28, 44, 37, ... .

Examples

			0 is a term since the Zeckendorf representation of 2^0 = 1 is A014417(1) = 1, and the Zeckendorf representation of 2^1 = 2 is A014417(2) = 10, so A020908(0) = A020908(1) = 1.
5 is a term since the Zeckendorf representation of 2^5 = 32 is A014417(32) = 1010100, and the Zeckendorf representation of 2^6 = 64 is A014417(64) = 100010001, so A020908(5) = A020908(6) = 3.
		

Crossrefs

A374961 is a subsequence.

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, 1500], s[#] == s[# + 1] &]
  • 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); for(k = 1, kmax, z2 = A007895(2^k); if(z1 == z2, print1(k-1 , ", ")); z1 = z2);}
Showing 1-3 of 3 results.