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-4 of 4 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

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
Showing 1-4 of 4 results.