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

A162910 Denominators of Bird tree fractions.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 2, 5, 4, 4, 5, 2, 1, 3, 3, 8, 7, 5, 7, 7, 5, 7, 8, 3, 3, 1, 2, 5, 4, 4, 5, 13, 11, 9, 12, 9, 6, 10, 11, 11, 10, 6, 9, 12, 9, 11, 13, 5, 4, 4, 5, 2, 1, 3, 3, 8, 7, 5, 7, 7, 5, 7, 8, 21, 18, 14, 19, 16, 11, 17, 19, 14, 13, 7, 11, 17, 13, 15, 18, 18, 15, 13, 17, 11, 7, 13, 14, 19
Offset: 1

Views

Author

Ralf Hinze (ralf.hinze(AT)comlab.ox.ac.uk), Aug 05 2009

Keywords

Comments

The Bird tree is an infinite binary tree labeled with rational numbers. The root is labeled with 1. The tree enjoys the following fractal property: it can be transformed into its left subtree by first incrementing and then reciprocalizing the elements; for the right subtree interchange the order of the two steps: the elements are first reciprocalized and then incremented. Like the Stern-Brocot tree, the Bird tree enumerates all the positive rationals (A162909(n)/A162910(n)).
From Yosu Yurramendi, Jul 11 2014: (Start)
If the terms (n>0) are written as an array (left-aligned fashion) with rows of length 2^m, m = 0,1,2,3,...
1,
2, 1,
3, 3,1, 2,
5, 4,4, 5,2,1, 3, 3,
8, 7,5, 7,7,5, 7, 8, 3, 3,1,2, 5,4, 4, 5,
13,11,9,12,9,6,10,11,11,10,6,9,12,9,11,13,5,4,4,5,2,1,3,3,8,7,5,7,7,5,7,8,
then the sum of the m-th row is 3^m (m = 0,1,2,), each column k is a Fibonacci sequence.
If the rows are written in a right-aligned fashion:
1,
2,1,
3,3,1,2,
5,4,4,5,2,1,3,3,
8,7,5,7,7,5,7,8,3,3,1,2,5,4,4,5,
13,11,9,12,9,6,10,11,11,10,6,9,12,9,11,13,5,4,4,5,2,1,3,3,8,7,5,7,7,5,7,8,
then each column k also is a Fibonacci sequence.
The Fibonacci sequences of both triangles are equal except the first terms of second triangle.
If the sequence is considered by blocks of length 2^m, m = 0,1,2,..., the blocks of this sequence are the reverses of blocks of A162909 ( a(2^m+k) = A162909(2^(m+1)-1-k), m = 0,1,2,..., k = 0,1,2,...,2^m-1).
(End)

Examples

			The first four levels of the Bird tree: [1/1] [1/2, 2/1] [2/3, 1/3, 3/1, 3/2], [3/5, 3/4, 1/4, 2/5, 5/2, 4/1, 4/3, 5/3].
		

Crossrefs

This sequence is the composition of A162912 and A059893: a(n) = A162912(A059893(n)). This sequence is a permutation of A002487(n+2).

Programs

  • Haskell
    import Ratio; bird :: [Rational]; bird = branch (recip . succ) (succ . recip) 1; branch f g a = a : branch f g (f a) \/ branch f g (g a); (a : as) \/ bs = a : (bs \/ as); a162909 = map numerator bird; a162910 = map denominator bird
    
  • R
    blocklevel <- 6 # arbitrary
    a <- 1
    for(m in 1:blocklevel) for(k in 0:(2^(m-1)-1)){
    a[2^m+k]         = a[2^m-k-1] + a[2^(m-1)+k]
    a[2^m+2^(m-1)+k] = a[2^m-k-1]
    }
    a
    # Yosu Yurramendi, Jul 11 2014

Formula

a(2^m+k) = a(2^m-k-1) + a(2^(m-1)+k), a(2^m+2^(m-1)+k) = a(2^m-k-1), a(1) = 1, m=0,1,2,3,..., k=0,1,...,2^(m-1)-1. - Yosu Yurramendi, Jul 11 2014
If k is odd a(A080675(n)*2^m+k) = A268087(2^m+k), if k is even a(A136412(2^m+k+1)*2^m+k) = A268087(2^m+k), m >= 0, 0 <= k < 2^m, n > 0. a(A081254(n)) = 1, n > 0. - Yosu Yurramendi, Feb 21 2017
a(n) = A002487(1+A258996(A059893(n))) = A002487(1+A059893(A258746(n))), n > 0. - Yosu Yurramendi, Jul 14 2021

A122229 a(n) = A014486(A122228(n)).

Original entry on oeis.org

0, 2, 12, 56, 228, 920, 3684, 14744, 58980, 235928, 943716, 3774872, 15099492, 60397976, 241591908, 966367640, 3865470564, 15461882264, 61847529060, 247390116248, 989560464996, 3958241859992, 15832967439972
Offset: 0

Views

Author

Antti Karttunen, Sep 14 2006

Keywords

Comments

A simple formula exists, cf. A080675.

Crossrefs

A122230 shows the same sequence in binary. Compare to similar Wolframesque plots given in A080070, A122232, A122235, A122239, A122242, A122245.

A106191 Expansion of sqrt(1-4x)/(1-x).

Original entry on oeis.org

1, -1, -3, -7, -17, -45, -129, -393, -1251, -4111, -13835, -47427, -164999, -581023, -2066823, -7415703, -26805393, -97520733, -356810313, -1312087713, -4846614093, -17974854933, -66907388973, -249872516253, -935991743553, -3515800038201, -13239692841105
Offset: 0

Views

Author

Paul Barry, Apr 24 2005

Keywords

Comments

Row sums of number triangle A106190. Partial sums of A002420.
For n >= 1, the absolute values also give the iterates of A122237, starting from 0. (A122237(0), A122237(A122237(0)), A122237(A122237(A122237(0))), ...), this stems from the fact that the sequence gives the positions of terms with binary expansion 1(10){n-1}0 in A014486 (see A080675).

Crossrefs

|a(n)| = A080300(A080675(n)) = A075161(A001348(n)) (for n >= 1) = A075163(A000244(A008578(n-2))) = A014137(n-1)+A014138(n-2) = 2*A014137(n-1)-1, for n >= 2 (because binomial(2n+2, n+1)/(2n+1) = 2*A000108(n)).

Formula

a(n) = Sum_{k=0..n} binomial(2k, k)/(1-2k).
G.f.: (2/(1-x))/G(0), where G(k) = 1 + 1/(1 - 2*x*(2*k+1)/(2*x*(2*k+1) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
D-finite with recurrence: a(0)=1, a(1)=-1; for n>1, a(n) = (1/n)*((5*n-6)*a(n-1) - (4*n-6)*a(n-2)). - Tani Akinari, Aug 25 2013

Extensions

Barry's formula made more succinct, as well as comments regarding interpretation as absolute values added by Antti Karttunen, Sep 14 2006

A211016 Triangle read by rows: T(n,k) = number of squares and rectangles of area 2^(k-1) after 2^n stages in the toothpick structure of A139250, n>=1, k>=1, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 4, 8, 12, 4, 40, 52, 12, 4, 168, 212, 52, 12, 4, 680, 852, 212, 52, 12, 4, 2728, 3412, 852, 212, 52, 12, 4, 10920, 13652, 3412, 852, 212, 52, 12, 4, 43688, 54612, 13652, 3412, 852, 212, 52, 12, 4, 174760, 218452, 54612, 13652, 3412, 852, 212, 52, 12, 4
Offset: 1

Views

Author

Omar E. Pol, Sep 18 2012

Keywords

Comments

All internal regions in the toothpick structure are squares and rectangles.

Examples

			For n = 5 in the toothpick structure after 2^5 stages we have that:
T(5,1) = 168 is the number of squares of size 1 X 1.
T(5,2) = 212 is the number of rectangles of size 1 X 2.
T(5,3) = 52 is the total number of squares of size 2 X 2 and of rectangles of size 1 X 4.
T(5,4) = 12 is the number of rectangles of size 2 X 4.
T(5,5) = 4 is the number of rectangles of size 2 X 8.
Triangle begins:
       0;
       0,      4;
       8,     12,     4;
      40,     52,    12,     4;
     168,    212,    52,    12,    4;
     680,    852,   212,    52,   12,   4;
    2728,   3412,   852,   212,   52,  12,   4;
   10920,  13652,  3412,   852,  212,  52,  12,  4;
   43688,  54612, 13652,  3412,  852, 212,  52, 12,  4;
  174760, 218452, 54612, 13652, 3412, 852, 212, 52, 12, 4;
		

Crossrefs

Row sums give 0 together with A145655.

Formula

T(n,k) = A211008(2^n,k) = 4*A211019(n,k).
T(n,1) = 4*A020988(n-2), n>=2.

A216648 Triangle T(n,k) in which n-th row lists in increasing order all positive integers with a representation as totally balanced 2n digit binary string without totally balanced proper prefixes such that all consecutive totally balanced substrings are in nondecreasing order; n>=1, 1<=k<=A000081(n).

Original entry on oeis.org

2, 12, 52, 56, 212, 216, 232, 240, 852, 856, 872, 880, 920, 936, 944, 976, 992, 3412, 3416, 3432, 3440, 3480, 3496, 3504, 3536, 3552, 3688, 3696, 3752, 3760, 3792, 3808, 3888, 3920, 3936, 4000, 4032, 13652, 13656, 13672, 13680, 13720, 13736, 13744, 13776
Offset: 1

Views

Author

Alois P. Heinz, Sep 12 2012

Keywords

Comments

There is a simple bijection between the elements of row n and the rooted trees with n nodes. Each matching pair (1,0) in the binary string representation encodes a node, each totally balanced substring encodes a list of subtrees.

Examples

			856 is element of row 5, the binary string representation (with totally balanced substrings enclosed in parentheses) is (1(10)(10)(1(10)0)0).  The encoded rooted tree is:
.    o
.   /|\
.  o o o
.      |
.      o
Triangle T(n,k) begins:
2;
12;
52,     56;
212,   216,  232,  240;
852,   856,  872,  880,  920,  936,  944,  976,  992;
3412, 3416, 3432, 3440, 3480, 3496, 3504, 3536, 3552, 3688, 3696, ...
Triangle T(n,k) in binary:
10;
1100;
110100,       111000;
11010100,     11011000,     11101000,     11110000;
1101010100,   1101011000,   1101101000,   1101110000,   1110011000, ...
110101010100, 110101011000, 110101101000, 110101110000, 110110011000, ...
		

Crossrefs

First column gives: A080675.
Last elements of rows give: A020522.
Row lengths are: A000081.
Subsequence of A057547, A081292.

Programs

  • Maple
    F:= proc(n) option remember; `if`(n=1, [10], sort(map(h->
          parse(cat(1, sort(h)[], 0)), g(n-1, n-1)))) end:
    g:= proc(n, i) option remember; `if`(i=1, [[10$n]], [seq(seq(seq(
          [seq (F(i)[w[t]-t+1], t=1..j),v[]], w=combinat[choose](
          [$1..nops(F(i))+j-1], j)), v=g(n-i*j, i-1)), j=0..n/i)])
        end:
    b:= proc(n) local h, i, r; h, r:= n, 0; for i from 0
          while h>0 do r:= r+2^i*irem(h, 10, 'h') od; r
        end:
    T:= proc(n) option remember; map(b, F(n))[] end:
    seq(T(n), n=1..7);

Formula

T(n,k) = A216649(n-1,k)*2 + 2^(2*n-1) for n>1.

A345290 a(n) is obtained by replacing 2^k in binary expansion of n with Fibonacci(-k-2).

Original entry on oeis.org

0, -1, 2, 1, -3, -4, -1, -2, 5, 4, 7, 6, 2, 1, 4, 3, -8, -9, -6, -7, -11, -12, -9, -10, -3, -4, -1, -2, -6, -7, -4, -5, 13, 12, 15, 14, 10, 9, 12, 11, 18, 17, 20, 19, 15, 14, 17, 16, 5, 4, 7, 6, 2, 1, 4, 3, 10, 9, 12, 11, 7, 6, 9, 8, -21, -22, -19, -20, -24
Offset: 0

Views

Author

Rémy Sigrist, Jun 13 2021

Keywords

Comments

This sequence is a variant of A022290; here we consider Fibonacci numbers with negative indices (A039834), there Fibonacci numbers with positive indices (A000045).
After the initial 0, the sequence alternates runs of positive terms and runs of negative terms, the k-th run having 2^(k-1) terms.

Examples

			For n = 3:
- 3 = 2^1 + 2^0,
- so a(3) = A039834(2+1) + A039834(2+0) = 2 - 1 = 1.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=fibonacci(-2-e)); v }

Formula

a(n) = A022290(A063695(n)) - A022290(A063694(n)).
a(n) = A022290(n) iff n belongs to A062880.
a(n) = -A022290(n) iff n belongs to A000695.
a(n) = 0 iff n = 0.
a(n) = 1 iff n belongs to A072197.
a(n) = 2 iff n belongs to A080675.
a(n) = -1 iff n belongs to A020989.
a(n) = -2 iff n belongs to A136412.
Showing 1-6 of 6 results.