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.

A219641 a(n) = n minus (number of 1's in Zeckendorf expansion of n).

Original entry on oeis.org

0, 0, 1, 2, 2, 4, 4, 5, 7, 7, 8, 9, 9, 12, 12, 13, 14, 14, 16, 16, 17, 20, 20, 21, 22, 22, 24, 24, 25, 27, 27, 28, 29, 29, 33, 33, 34, 35, 35, 37, 37, 38, 40, 40, 41, 42, 42, 45, 45, 46, 47, 47, 49, 49, 50, 54, 54, 55, 56, 56, 58, 58, 59, 61, 61, 62, 63, 63, 66
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.

Crossrefs

Cf. A007895, A014417. A022342 gives the positions of records, resulting the same sequence with duplicates removed: A219640. A035336 gives the positions of values that occur only once: A219639. Cf. also A219637, A219642. Analogous sequence for binary system: A011371, for factorial number system: A219651.

Programs

  • Mathematica
    zeck = DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1];
    Range[0, Length[zeck]-1] - zeck (* Jean-François Alcover, Jan 25 2018 *)
  • Python
    from sympy import fibonacci
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return str(x).count("1")
    print([n - a(n) for n in range(101)]) # Indranil Ghosh, Jun 09 2017
  • Scheme
    (define (A219641 n) (- n (A007895 n)))
    

Formula

a(n) = n - A007895(n).

A219640 Numbers m for which there exists k such that m = k - (number of 1's in Zeckendorf expansion of k); distinct values in A219641.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 9, 12, 13, 14, 16, 17, 20, 21, 22, 24, 25, 27, 28, 29, 33, 34, 35, 37, 38, 40, 41, 42, 45, 46, 47, 49, 50, 54, 55, 56, 58, 59, 61, 62, 63, 66, 67, 68, 70, 71, 74, 75, 76, 78, 79, 81, 82, 83, 88, 89, 90, 92, 93, 95, 96, 97, 100, 101, 102
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

These are the positive integers i for which there exists k such that A007895(i+k)=k.
Starting offset is zero, because a(0) = 0 is a special case. Start indexing from 1 when you want only nonzero natural numbers satisfying the same condition.

Crossrefs

Cf. A007895, A022342, A219641. Complement: A219638. Union of A219639 and A219637.
First differences: A261095.
Characteristic function: A261092.
Left inverses: A261093, A261094.
Analogous sequences for other bases: A005187, A219650.

Programs

Formula

a(n) = A219641(A022342(n+1)).
Other identities. For all n >= 0:
A261093(a(n)) = n.
A261094(a(n)) = n.

Extensions

Starting offset changed to 0 by Antti Karttunen, Aug 08 2015

A219637 Numbers that occur twice in A219641.

Original entry on oeis.org

0, 2, 4, 7, 9, 12, 14, 16, 20, 22, 24, 27, 29, 33, 35, 37, 40, 42, 45, 47, 49, 54, 56, 58, 61, 63, 66, 68, 70, 74, 76, 78, 81, 83, 88, 90, 92, 95, 97, 100, 102, 104, 108, 110, 112, 115, 117, 121, 123, 125, 128, 130, 133, 135, 137, 143, 145, 147, 150, 152, 155
Offset: 1

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Crossrefs

Showing 1-3 of 3 results.