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-10 of 13 results. Next

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

A219638 Complement of A219640. Natural numbers that do not occur in A219641.

Original entry on oeis.org

3, 6, 10, 11, 15, 18, 19, 23, 26, 30, 31, 32, 36, 39, 43, 44, 48, 51, 52, 53, 57, 60, 64, 65, 69, 72, 73, 77, 80, 84, 85, 86, 87, 91, 94, 98, 99, 103, 106, 107, 111, 114, 118, 119, 120, 124, 127, 131, 132, 136, 139, 140, 141, 142, 146, 149, 153, 154, 158, 161
Offset: 1

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

These are positive integers i for which there does not exist any k such that A007895(i+k)=k.

Crossrefs

A219640, A219641, A219648. Analogous sequence for binary system: A055938, for factorial number system: A219658.

A219639 Numbers that occur only once in A219641.

Original entry on oeis.org

1, 5, 8, 13, 17, 21, 25, 28, 34, 38, 41, 46, 50, 55, 59, 62, 67, 71, 75, 79, 82, 89, 93, 96, 101, 105, 109, 113, 116, 122, 126, 129, 134, 138, 144, 148, 151, 156, 160, 164, 168, 171, 177, 181, 184, 189, 193, 198, 202, 205, 210, 214, 218, 222, 225, 233, 237, 240
Offset: 1

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

Fibonacci numbers, A000045(i) from i>=5 onward, 5, 8, 13, 21, ..., all occur in this sequence, as well as these numbers plus 2: 7, 10, 15, 23, all have Zeckendorf-expansions with just two 1's and end with ...010.

Crossrefs

Cf. A219637.

Formula

a(n) = A219641(A035336(n)).

A219649 Irregular table, where row n (n >= 0) starts with n, the next term is A219641(n), and the successive terms are obtained by repeatedly subtracting the number of 1's in the previous term's Zeckendorf expansion, until zero is reached, after which the next row starts with one larger n.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 2, 1, 0, 5, 4, 2, 1, 0, 6, 4, 2, 1, 0, 7, 5, 4, 2, 1, 0, 8, 7, 5, 4, 2, 1, 0, 9, 7, 5, 4, 2, 1, 0, 10, 8, 7, 5, 4, 2, 1, 0, 11, 9, 7, 5, 4, 2, 1, 0, 12, 9, 7, 5, 4, 2, 1, 0, 13, 12, 9, 7, 5, 4, 2, 1, 0, 14, 12, 9, 7, 5, 4, 2, 1, 0, 15
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

Rows converge towards A219648 (reversed).
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.

Crossrefs

Cf. A007895, A014417, A219641, A219647. Analogous sequence for binary system: A218254, for factorial number system: A219659.

A219651 a(n) = n minus (sum of digits in factorial base expansion of n).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 5, 6, 6, 7, 7, 10, 10, 11, 11, 12, 12, 15, 15, 16, 16, 17, 17, 23, 23, 24, 24, 25, 25, 28, 28, 29, 29, 30, 30, 33, 33, 34, 34, 35, 35, 38, 38, 39, 39, 40, 40, 46, 46, 47, 47, 48, 48, 51, 51, 52, 52, 53, 53, 56, 56, 57, 57, 58, 58, 61, 61
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

See A007623 for the factorial base number system representation.

Crossrefs

Bisection: A219650. Analogous sequence for binary system: A011371, for Zeckendorf expansion: A219641.

Programs

  • Mathematica
    (* First run program for A007623 to define factBaseIntDs *) Table[n - Plus@@factBaseIntDs[n], {n, 0, 99}] (* Alonso del Arte, Nov 25 2012 *)
  • Python
    from itertools import count
    def A219651(n):
        c, f = 0, 1
        for i in count(2):
            f *= i
            if f>n:
                break
            c += (i-1)*(n//f)
        return c # Chai Wah Wu, Oct 11 2024
  • Scheme
    (define (A219651 n) (- n (A034968 n)))
    

Formula

a(n) = n - A034968(n).

A236840 n minus number of runs in the binary expansion of n: a(n) = n - A005811(n).

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 4, 6, 6, 6, 6, 8, 10, 10, 12, 14, 14, 14, 14, 16, 16, 16, 18, 20, 22, 22, 22, 24, 26, 26, 28, 30, 30, 30, 30, 32, 32, 32, 34, 36, 36, 36, 36, 38, 40, 40, 42, 44, 46, 46, 46, 48, 48, 48, 50, 52, 54, 54, 54, 56, 58, 58, 60, 62, 62, 62, 62, 64, 64, 64
Offset: 0

Views

Author

Antti Karttunen, Apr 18 2014

Keywords

Comments

All terms are even. Used by the "number-of-runs beanstalk" sequence A255056 and many of its associated sequences.

Crossrefs

Cf. A091067 (the positions of records), A106836 (run lengths).
Cf. A255070 (terms divided by 2).

Programs

  • Maple
    A236840 := proc(n) local i, b; if n=0 then 0 else b := convert(n, base, 2); select(i -> (b[i-1]<>b[i]), [$2..nops(b)]); n-1-nops(%) fi end: seq(A236840(i), i=0..69); # Peter Luschny, Apr 19 2014
  • Mathematica
    a[n_] := n - Length@ Split[IntegerDigits[n, 2]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 16 2023 *)
  • Scheme
    (define (A236840 n)  (- n (A005811 n)))

Formula

a(n) = n - A005811(n) = n - A000120(A003188(n)).
a(n) = 2*A255070(n).

A219648 The infinite trunk of Zeckendorf beanstalk. The only infinite sequence such that a(n-1) = a(n) - number of 1's in Zeckendorf representation of a(n).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 12, 14, 17, 20, 22, 24, 27, 29, 33, 35, 37, 40, 42, 45, 47, 50, 54, 56, 58, 61, 63, 67, 70, 74, 76, 79, 83, 88, 90, 92, 95, 97, 101, 104, 108, 110, 113, 117, 121, 123, 126, 130, 134, 138, 143, 145, 147, 150, 152, 156, 159, 163, 165, 168
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2012

Keywords

Comments

a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "Zeckendorf beanstalk" from its root (zero).
There are many finite sequences such as 0,1,2; 0,1,2,4,5; etc. (see A219649) and as the length increases, so (necessarily) does the similarity to this infinite sequence.
There can be only one infinite trunk in "Zeckendorf beanstalk" as all paths downwards from numbers >= A000045(i) must pass through A000045(i)-1 (i.e. A000071(i)). This provides also a well-defined method to compute the sequence, for example, via a partially reversed version A261076.
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.

Crossrefs

Cf. A000045, A000071, A007895, A014417, A219641, A219649, A261076, A261102. For all n, A219642(a(n)) = n and A219643(n) <= a(n) <= A219645(n). Cf. also A261083 & A261084.
Other similarly constructed sequences: A179016, A219666, A255056.

Programs

Formula

a(n) = A261076(A261102(n)).

A219642 Number of steps to reach 0 starting with n and using the iterated process: x -> x - (number of 1's in Zeckendorf expansion of x).

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 22, 23, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 29
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, A219640, A219641, A219643-A219645, A219648. Analogous sequence for binary system: A071542, for factorial number system: A219652.

Programs

  • 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)
    a(n)=my(s); while(n, n-=A007895(n); s++); s \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from sympy import fibonacci
    def a007895(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")
    def a219641(n): return n - a007895(n)
    l=[0]
    for n in range(1, 101):
        l.append(1 + l[a219641(n)])
    print(l) # Indranil Ghosh, Jun 09 2017

Formula

a(0)=0; for n>0, a(n) = 1+a(A219641(n)).

A261091 a(n) = number of steps required to reach F(n+1)-1 from F(n+2)-1 by repeatedly subtracting from a natural number the number of ones in its Zeckendorf representation. Here F(n) = the n-th Fibonacci number, F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2, ...

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 5, 8, 11, 17, 25, 37, 56, 85, 130, 199, 305, 469, 723, 1118, 1733, 2693, 4193, 6539, 10211, 15962, 24974, 39103, 61262, 96030, 150608, 236338, 371101, 583118, 916978, 1443204, 2273434, 3584522, 5656786, 8934696, 14123156, 22340250
Offset: 0

Views

Author

Antti Karttunen, Aug 08 2015

Keywords

Crossrefs

From a(1) onward the first differences of both A261081 and A261082.
Cf. A261090 (first differences of this sequence).
Cf. also A261102, A261076.

Programs

  • Scheme
    (define (A261091 n) (let ((end (- (A000045 (+ 1 n)) 1))) (let loop ((k (- (A000045 (+ 2 n)) 1)) (s 0)) (if (= k end) s (loop (A219641 k) (+ 1 s))))))

Formula

a(n) = A219642(A000071(n+2)) - A219642(A000071(n+1)). [By definition.]
a(n) = A219642(A000045(n+2)) - A219642(A000045(n+1)). [Equally.]
Showing 1-10 of 13 results. Next