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-8 of 8 results.

A182535 Number of terms in Zeckendorf representation of prime(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 3, 2, 2, 3, 2, 3, 3, 2, 4, 3, 3, 4, 3, 3, 3, 4, 1, 2, 4, 3, 3, 4, 3, 4, 3, 4, 4, 2, 3, 2, 4, 3, 3, 3, 3, 3, 4, 5, 2, 5, 4, 5, 5, 1, 3, 2, 3, 3, 4, 3, 4, 4, 4, 4, 3, 5, 4, 5, 4, 4, 4, 5, 5, 5, 4, 5, 6, 2, 3, 4, 4, 3, 4, 3, 4, 5, 3, 4, 4, 5, 5, 4, 5, 3, 3, 3, 5, 6, 4, 5, 2, 3, 5, 4, 4, 4, 5, 5
Offset: 1

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Comments

Alternately, the minimum number of Fibonacci numbers which sum to prime(n). - Alan Worley, Apr 17 2015

Examples

			prime(4)=7, and 7 is represented as 5+2, so a(4)=2.
prime(7)=17, and 17 is represented as 13+3+1, so a(7)=3.
		

Crossrefs

Programs

  • Mathematica
    f[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; Count[fr, 1]]; f@# & /@ Prime@ Range@ 105 (* Robert G. Wilson v, Apr 22 2015 *)

Formula

a(n) = A007895(A000040(n)).

A182576 Number of 1's in the Zeckendorf representation of n^2.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 4, 1, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 3, 3, 3, 4, 5, 5, 6, 4, 5, 3, 3, 5, 3, 4, 3, 6, 4, 2, 4, 4, 5, 6, 6, 7, 3, 4, 6, 5, 4, 5, 5, 5, 5, 6, 3, 5, 7, 4, 5, 6, 4, 6, 4, 5, 6, 5, 6, 6, 6, 4, 6, 7, 7, 8, 5, 6, 7, 6, 6, 7, 4, 4, 6, 3
Offset: 0

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Comments

Also the minimum number of different Fibonacci numbers that sum up to n^2. - Carmine Suriano, Jul 03 2013
See A088060 for some comments related to the occurrence of 2's. - Peter Munn, Mar 22 2021

Examples

			a(11)=4 since 11^2 = 121 = 89 + 21 + 8 + 3 = fib(11) + fib(8) + fib(6) + fib(4). - _Carmine Suriano_, Jul 03 2013
		

Crossrefs

A182577 Number of ones in Zeckendorf representation of n!

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 3, 5, 6, 9, 8, 11, 11, 11, 16, 17, 17, 18, 23, 23, 28, 31, 33, 27, 33, 29, 40, 37, 42, 42, 41, 44, 47, 44, 53, 56, 57, 50, 64, 55, 59, 68, 63, 72, 70, 61, 69, 85, 80, 83, 87, 97, 98, 101, 87, 91, 100, 102, 114, 108, 116, 109, 117, 117, 113, 124
Offset: 0

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Examples

			5! = {1, 0, 0, 1, 0, 1, 0, 0, 1, 0} in the Zeckendorf base.
		

Crossrefs

Programs

  • Python
    from math import factorial
    def A182577(n):
        m, tlist, s = factorial(n), [1,2], 0
        while tlist[-1]+tlist[-2] <= m:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            if d <= m:
                s += 1
                m -= d
        return s # Chai Wah Wu, Jun 15 2018

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);}

A182578 Number of ones in Zeckendorf representation of n^n.

Original entry on oeis.org

1, 1, 2, 3, 3, 6, 3, 10, 13, 12, 16, 15, 20, 24, 20, 30, 25, 31, 26, 33, 33, 31, 34, 42, 49, 49, 53, 55, 56, 55, 58, 64, 64, 67, 73, 78, 70, 76, 77, 75, 89, 83, 92, 90, 106, 99, 100, 99, 107, 116, 107, 115, 125, 125, 122, 119, 127, 137, 127, 138, 155, 156, 153, 160
Offset: 0

Views

Author

Alex Ratushnyak, May 05 2012

Keywords

Examples

			5^5 = {1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0} in the Zeckendorf base.
		

Crossrefs

Programs

  • Python
    def A182578(n):
        m, tlist, s = n**n, [1,2], 0
        while tlist[-1]+tlist[-2] <= m:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            if d <= m:
                s += 1
                m -= d
        return s # Chai Wah Wu, Jun 14 2018

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);}

A374962 Numbers k such that the number of terms in the Zeckendorf representation of 2^k equals the binary weight of Fibonacci(k).

Original entry on oeis.org

1, 3, 4, 7, 8, 13, 14, 20, 26, 50, 55, 58, 90, 140, 270, 314, 603
Offset: 1

Views

Author

Amiram Eldar, Jul 25 2024

Keywords

Comments

Numbers k such that A007895(A000079(k)) = A000120(A000045(k)), or equivalently A020908(k) = A011373(k).
The corresponding values of A020908(k) = A011373(k) are 1, 1, 2, 3, 3, 5, 6, 8, 9, 18, 22, 24, 33, 53, 106, 122, 232, ... .
a(18) > 63000, if it exists.
a(18) > 333333, if it exists. - Lucas A. Brown, Aug 13 2024

Examples

			  n | k = a(n) | 2^k | A014417(2^k) | F(k) | A007088(F(k)) | Number of 1's
  --+----------+-----+--------------+------+---------------+--------------
  1 |        1 |   2 |           10 |    1 |             1 |             1
  2 |        3 |   8 |        10000 |    2 |            10 |             1
  3 |        4 |  16 |       100100 |    3 |            11 |             2
  4 |        7 | 128 |   1010001000 |   13 |          1101 |             3
  5 |        8 | 256 | 100001000010 |   21 |         10101 |             3
		

Crossrefs

Programs

  • Mathematica
    z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *)
    Select[Range[700], z[2^#] == DigitCount[Fibonacci[#], 2, 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
    is(k) = A007895(2^k) == hammingweight(fibonacci(k));

A356977 a(n) is the number of solutions, j >= 0 and 2 <= m_1 <= ... <= m_n, of the equation Sum_{k=1..n} F(m_k) = 2^j where F(i) is the i-th Fibonacci number.

Original entry on oeis.org

0, 3, 6, 10, 36, 66
Offset: 0

Views

Author

Peter Munn and Jon E. Schoenfield, Sep 07 2022

Keywords

Comments

The difficulty of this sequence comes in determining which is the largest j in a solution for a(n), equivalently the last nonzero term in each sum from the A319394-based formula in the formula section.
a(2) derives from Bravo and Luca, a(3) from Bravo and Bravo, a(4) from Pagdame Tiebekabe and Diouf. Pagdame has indicated A356928(5), from which a(5) is derived, has been determined.
a(6) >= 178, a(7) >= 478.

Examples

			For n = 2, the a(2) = 6 solutions are j = 1 with (2,2), j = 2 with (2,4) and (3,3), j = 3 with (4,5), j = 4 with (4,7) and (6,6) according to the paper of Bravo and Luca. [That is, 2 = 1+1, 4 = 1+3 = 2+2, 8 = 3+5, 16 = 3+13 = 8+8.]
		

References

  • J. J. Bravo, and F. Luca, On the Diophantine equation F_n+F_m=2^a, Quaest. Math. 39 (2016) 391-400.
  • P. Tiebekabe and I. Diouf, On solutions of Diophantine equation F_{n_1}+F_{n_2}+F_{n_3}+F_{n_4}=2^a, Journal of Algebra and Related Topics, Volume 9, Issue 2 (2021), 131-148.

Crossrefs

Formula

a(n) = Sum_{i >= 0} A319394(2^i, k).
Showing 1-8 of 8 results.