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 12 results. Next

A261083 a(n) = A219648(n) - A219643(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 09 2015

Keywords

Crossrefs

Programs

Formula

a(n) = A219648(n) - A219643(n).

A261084 a(n) = A219645(n) - A219648(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 1, 1, 2, 1, 2, 3, 0, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 2, 3, 3, 3, 4, 0, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 2, 3, 3, 3, 4, 2, 2, 1, 2, 3, 2, 3, 3, 0, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 2, 3, 3, 3, 4, 2, 2, 1, 2, 3, 2, 3, 3, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Aug 09 2015

Keywords

Crossrefs

Programs

Formula

a(n) = A219645(n) - A219648(n).

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

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 11, 15, 16, 19, 23, 26, 31, 32, 35, 39, 42, 46, 49, 53, 57, 63, 64, 67, 71, 74, 78, 81, 85, 89, 94, 97, 101, 104, 109, 112, 116, 120, 127, 128, 131, 135, 138, 142, 145, 149, 153, 158, 161, 165, 168, 173, 176, 180, 184, 190, 193, 197, 200, 205, 209
Offset: 0

Views

Author

Carl R. White, Jun 24 2010

Keywords

Comments

a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "binary beanstalk" from its root (zero). The name "beanstalk" is due to Antti Karttunen.
There are many finite sequences such as 0,1,2; 0,1,3,4,7,9; etc. obeying the same condition (see A218254) and as the length increases, so (necessarily) does the similarity to this infinite sequence.

Crossrefs

A subsequence of A005187, i.e., a(n) = A005187(A213715(n)). For all n,
A071542(a(n)) = n, and furthermore A213708(n) <= a(n) <= A173601(n). (Cf. A218603, A218604).
Rows of A218254, when reversed, converge towards this sequence.
Cf. A276623, A219648, A219666, A255056, A276573, A276583, A276613 for analogous constructions, and also A259934.

Programs

  • Mathematica
    TakeWhile[Reverse@ NestWhileList[# - DigitCount[#, 2, 1] &, 10^3, # > 0 &], # <= 209 &] (* Michael De Vlieger, Sep 12 2016 *)

Formula

a(0)=0, a(1)=1, and for n > 1, if n = A218600(A213711(n)) then a(n) = (2^A213711(n)) - 1, and in other cases, a(n) = a(n+1) - A213712(n+1). (This formula is based on Carl White's observation that this iterated/converging path must pass through each (2^n)-1. However, it would be very interesting to know whether the sequence admits more traditional recurrence(s), referring to previous, not to further terms in the sequence in their definition!) - Antti Karttunen, Oct 26 2012
a(n) = A218616(A218602(n)). - Antti Karttunen, Mar 04 2013
a(n) = A054429(A233271(A218602(n))). - Antti Karttunen, Dec 12 2013

Extensions

Starting offset changed from 1 to 0 by Antti Karttunen, Nov 05 2012

A219666 The infinite trunk of factorial expansion beanstalk. The only infinite sequence such that a(n-1) = a(n) - sum of digits in factorial expansion of a(n).

Original entry on oeis.org

0, 1, 2, 5, 7, 10, 12, 17, 23, 25, 28, 30, 35, 40, 46, 48, 52, 57, 63, 70, 74, 79, 85, 92, 97, 102, 109, 119, 121, 124, 126, 131, 136, 142, 144, 148, 153, 159, 166, 170, 175, 181, 188, 193, 198, 204, 213, 221, 228, 238, 240, 244, 249, 255, 262, 266, 271, 277
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "factorial beanstalk" from its root (zero).
There are many finite sequences such as 0,1,2,4; 0,1,2,5,6; etc. obeying the same condition (see A219659) and as the length increases, so (necessarily) does the similarity to this infinite sequence.
See A007623 for the factorial number system representation.

Crossrefs

Cf. A007623, A034968, A219651, A230411, A226061. For all n, A219652(a(n)) = n and A219653(n) <= a(n) <= A219655(n).
Characteristic function: Χ_A219666(n) = A230418(n+1)-A230418(n).
The first differences: A230406.
Subsets: A230428 & A230429.
Analogous sequence for binary system: A179016, for Fibonacci number system: A219648.

Programs

  • Mathematica
    nn = 10^3; m = 1; While[m! < Floor[6 nn/5], m++]; m; t = TakeWhile[Reverse@ NestWhileList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, Floor[6 nn/5], # > 0 &], # <= nn &] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
  • Scheme
    ;; Memoizing definec-macro from Antti Karttunen's IntSeq-library
    (definec (A219666 n) (cond ((<= n 2) n) ((= (A226061 (A230411 n)) n) (- (A000142 (A230411 n)) 1)) (else (- (A219666 (+ n 1)) (A034968 (A219666 (+ n 1)))))))
    ;; Another variant, utilizing A230416 (which gives a more convenient way to compute large number of terms of this sequence):
    (define (A219666 n) (A230416 (A230432 n)))
    ;; This function is for checking whether n belongs to this sequence:
    (define (inA219666? n) (or (zero? n) (= 1 (- (A230418 (+ 1 n)) (A230418 n)))))

Formula

a(0) = 0, a(1) = 1, and for n>1, if A226061(A230411(n)) = n then a(n) = A230411(n)!-1, otherwise a(n) = a(n+1) - A034968(a(n+1)).
a(n) = A230416(A230432(n)).

A255056 Trunk of number-of-runs beanstalk: The unique infinite sequence such that a(n-1) = a(n) - number of runs in binary representation of a(n).

Original entry on oeis.org

0, 2, 4, 6, 10, 12, 14, 18, 22, 26, 28, 30, 32, 36, 42, 46, 50, 54, 58, 60, 62, 64, 68, 74, 78, 84, 90, 94, 96, 100, 106, 110, 114, 118, 122, 124, 126, 128, 132, 138, 142, 148, 152, 156, 162, 168, 174, 180, 186, 190, 192, 196, 202, 206, 212, 218, 222, 224, 228, 234, 238, 242, 246, 250, 252, 254
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Comments

All numbers of the form (2^n)-2 are present, which guarantees the uniqueness and also provides a well-defined method to compute the sequence, for example, via a partially reversed version A255066.
The sequence was inspired by a similar "binary weight beanstalk", A179016, sharing some general properties with it (like its partly self-copying behavior, see A255071), but also differing in some aspects. For example, here the branching degree is not the constant 2, but can vary from 1 to 4. (Cf. A255058.)

Crossrefs

First differences: A255336.
Terms halved: A255057.
Cf. A255053 & A255055 (the lower & upper bound for a(n)) and also A255123, A255124 (distances to those limits).
Cf. A255327, A255058 (branching degree for node n), A255330 (number of nodes in the finite subtrees branching from the node n), A255331, A255332
Subsequence: A000918 (except for -1).
Similar "beanstalk's trunk" sequences using some other subtracting map than A236840: A179016, A219648, A219666.

Programs

Formula

a(n) = A255066(A255122(n)).
Other identities and observations. For all n >= 0:
a(n) = 2*A255057(n).
A255072(a(n)) = n.
A255053(n) <= a(n) <= A255055(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)).

A276623 The infinite trunk of ternary beanstalk: The only infinite sequence such that a(n-1) = a(n) - A053735(a(n)), where A053735(n) = base-3 digit sum of n.

Original entry on oeis.org

0, 2, 4, 8, 10, 12, 16, 20, 26, 28, 30, 34, 38, 42, 46, 52, 56, 62, 68, 72, 80, 82, 84, 88, 92, 96, 100, 106, 110, 116, 122, 126, 134, 140, 144, 152, 160, 164, 170, 176, 180, 188, 194, 198, 204, 212, 216, 224, 232, 242, 244, 246, 250, 254, 258, 262, 268, 272, 278, 284, 288, 296, 302, 306, 314, 322, 326, 332, 338, 342, 350, 356, 360
Offset: 0

Views

Author

Antti Karttunen, Sep 11 2016

Keywords

Crossrefs

Cf. A004128, A024023, A053735, A054861, A261231 (left inverse), A261233, A276622, A276624, A276603 (terms divided by 2), A276604 (first differences).
Cf. A179016, A219648, A219666, A255056, A259934, A276573, A276583, A276613 for similar constructions.
Cf. also A263273.

Programs

Formula

a(n) = A276624(A276622(n)).
Other identities. For all n >= 0:
A261231(a(n)) = n.
a(A261233(n)) = A024023(n) = 3^n - 1.

A261102 Simple self-inverse permutation of natural numbers: after zero, list each block of A261091(n) numbers in reverse order, from A261082(n) to A261081(n+1).

Original entry on oeis.org

0, 1, 2, 3, 5, 4, 7, 6, 10, 9, 8, 15, 14, 13, 12, 11, 23, 22, 21, 20, 19, 18, 17, 16, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 113, 112, 111
Offset: 0

Views

Author

Antti Karttunen, Aug 09 2015

Keywords

Comments

Maps between sequences A219648 and A261076.

Crossrefs

Cf. also A218602 (analogous sequence for base-2).

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.

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.
Showing 1-10 of 12 results. Next