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.

Previous Showing 21-30 of 31 results. Next

A169969 Locations of row maxima in "crushed" version of Stern's diatomic array.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 21, 27, 43, 53, 85, 107, 171, 213, 341, 427, 683, 853, 1365, 1707, 2731, 3413, 5461, 6827, 10923, 13653, 21845, 27307, 43691, 54613, 87381, 109227, 174763, 218453, 349525, 436907, 699051, 873813, 1398101, 1747627, 2796203, 3495253, 5592405
Offset: 1

Views

Author

N. J. A. Sloane, Aug 08 2010

Keywords

Comments

From Michel Marcus, Jan 22 2015: (Start)
The Stern's diatomic array begins (see A049456).
1...............................1
1...............2...............1
1.......3.......2.......3.......1
1...4...3...5...2...5...3...4...1
1.5.4.7.3.8.5.7.2.7.5.8.3.7.4.5.1
...
The "crushed" version is obtained by removing the right column, and then squeezing everything to the left.
1;
1, 2;
1, 3, 2, 3;
1, 4, 3, 5, 2, 5, 3, 4;
1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5;
...
This gives sequence 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, ... (cf. A002487).
The "crushed" array row maxima are: 1, 2, 3, 5, 8, ... (cf. A000045).
The indices of these values in A002487 are 1, 3, 5, 7, 11, ... : this sequence.
Note, for instance, that for 3rd row, the maximum which is 3, appears twice, at indices 5 and 7, giving 2 terms for this sequence.
(End)

Examples

			G.f. = x + 3*x^2 + 5*x^3 + 7*x^4 + 11*x^5 + 13*x^6 + 21*x^7 + 27*x^8 + 43*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n <= 5, {1, 3, 5, 7, 11}[[n]], a[n-2] + 2a[n-4]]; Array[a, 42] (* Jean-François Alcover, Dec 11 2016 *)
  • PARI
    fusc(n)=local(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b; \\ from A002487
    lista(nn) = {nb = 2^(nn+1)-1; vall = vector(nb, n, fusc(n)); for (n=1, nn, vmax = 0; for (j=2^(n-1), 2^n-1, if (vall[j] > vmax, vmax = vall[j]);); for (j=2^(n-1), 2^n-1, if (vall[j] == vmax, print1(j, ", "));););} \\ Michel Marcus, Jan 22 2015

Formula

a(2n+1) + a(2n+2) = 3*2^(n+1), n>0 . - Yosu Yurramendi, Jun 29 2016
a(2n+3) = 3*2^(n+1) - a(n); a(2n+4) = 3*2^(n+1) + a(n), n>=0, a(0)=0 (new term), a(1)=1, a(2)=3 . - Yosu Yurramendi, Jun 29 2016
G.f.: x*(1 + 3*x + 4*x^2 + 4*x^3 + 4*x^4)/((1 + x^2)*(1 - 2*x^2)). - Ilya Gutkovskiy, Jun 29 2016
For n>1, a(n) = (2^(n/2 - 1)*(5 + 4*sqrt(2) + (-1)^n*(5 - 4*sqrt(2))) + cos(Pi*n/2) + sin(Pi*n/2))/3. - Vaclav Kotesovec, Jun 30 2016
a(2n) = a(2n-7) + 3*2^(n-1); a(2n-1) = a(2n-7) - 3*2^(n-1), n>=5 . - Yosu Yurramendi, Jul 06 2016
a(2n-1) = A168642(n), n>0; a(2n) = A048573(n), n>0; a(2n-1) = A026644(n) + 1, n>1; a(2n) = A084170(n) + 1, n>0 . - Yosu Yurramendi, Dec 11 2016

Extensions

More terms from Michel Marcus, Jan 22 2015

A293957 When A002487 is written as a triangle the n-th row has length 2^(n-1); a(n) is the maximal multiplicity of any entry in that row, considering the entries strictly between the initial 1 and the central 2.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 4, 5, 6, 8, 12, 16, 22, 29, 36, 48, 67, 84, 118, 151, 203, 270, 362, 472, 636, 846, 1142, 1526, 2024, 2736, 3666, 4918, 6550, 8776, 11796, 15824
Offset: 0

Views

Author

N. J. A. Sloane, Nov 03 2017

Keywords

Comments

The maximal entry is row n is Fibonacci(n+1), and the smallest missing number is A135510(n). The number of distinct numbers in each row is given by A293160.
It would be nice to have a formula for this sequence, or at least some bounds.

Examples

			Rows 0 through 6 of A002487 are:
0,
1,
1, 2,
1, 3, 2, 3,
1, 4, 3, 5, 2, 5, 3, 4,
1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5,
1, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 2, 9, 7, 12, 5, 13, 8, 11, 3, 10, 7, 11, 4, 9, 5, 6,
To find a(5) we consider the entries 1, 5, 4, 7, 3, 8, 5, 7, 2 in row 5. Ignoring the initial 1 and the final 2, the maximal multiplicity is 2 (for example, 5 appears twice), so a(5) = 2.
From _Don Reble_, Nov 04 2017: (Start)
The initial values of a(n) for n >= 3 together with the terms that have the highest multiplicity are:
3    1 [3]
4    1 [3 4 5]
5    2 [5 7]
6    2 [5 7 9 11]
7    4 [11]
8    5 [13 17]
9    6 [19 23 31 41]
10    8 [23 37 43]
11   12 [71]
12   16 [71]
13   22 [127]
14   29 [109]
15   36 [199 251]
16   48 [263]
17   67 [433]
18   84 [701]
19  118 [839]
20  151 [1193]
21  203 [1801]
22  270 [2693]
23  362 [4229]
24  472 [4349]
25  636 [7759]
26  846 [11287]
27 1142 [14627]
28 1526 [20929]
29 2024 [37243]
30 2736 [43133]
31 3666 [67231]
32 4918 [90227]
33 6550 [127819]
34 8776 [181031]
35 11796 [251071]
36 15824 [394549]
(End)
		

Crossrefs

Programs

  • Maple
    A002487 := proc(n) option remember; if n <= 1 then n elif n mod 2 = 0 then procname(n/2); else procname((n-1)/2)+procname((n+1)/2); fi; end:
    ans:=[];
    for n from 3 to 18 do
    b1:=2^(n-1); b2:=2^n-1; b3:=2^(n-2)-1; mx:=0;
    ar:=Array(0..b1-1,0);
    for k from 1 to b3 do
    kk:=b1+k;
    v:=A002487(kk);
    ar[v]:=ar[v]+1;
    od:
       for k from 0 to b1-1 do if ar[k]>mx then mx:=ar[k]; fi; od:
    ans:=[op(ans),mx];
    od:
    ans;
  • Python
    from itertools import chain, product
    from collections import Counter
    from functools import reduce
    def A293957(n): return 0 if n <= 2 else max(Counter(m for m in (sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),chain(k,(1,)),(1,0))) for k in product((False,True),repeat=n-2)) if m != 1 and m != 2).values()) # Chai Wah Wu, Jun 20 2022

Extensions

a(19)-a(36) from Don Reble, Nov 04 2017

A294446 The tree of Farey fractions (or the Stern-Brocot tree), read across rows (the fraction i/j is represented as the pair i,j).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 21 2017

Keywords

Comments

The first row contains the fractions 0/1, 1/1,
and thereafter we copy the previous row, interpolating (a+c)/(b+d) between each pair of adjacent fractions a/b, c/d.
This version of the Farey tree contains the fractions in the range [0,1].
If we just look at the numerators we get A049455 and if we just look at the denominators we get A086596.

Examples

			This version of the tree begins as follows:
.................0/1..1/1
...............0/1..1/2..1/1
..........0/1..1/3..1/2..2/3..1/1
0/1..1/4..1/3..2/5..1/2..3/5..2/3..3/4..1/1
...
With the fractions written as pairs, the first few rows are:
[[0, 1], [1, 1]],
[[0, 1], [1, 2], [1, 1]],
[[0, 1], [1, 3], [1, 2], [2, 3], [1, 1]],
[[0, 1], [1, 4], [1, 3], [2, 5], [1, 2], [3, 5], [2, 3], [3, 4], [1, 1]],
[[0, 1], [1, 5], [1, 4], [2, 7], [1, 3], [3, 8], [2, 5], [3, 7], [1, 2], [4, 7,], [3, 5], [5, 8], [2, 3], [5, 7], [3, 4], [4, 5], [1, 1]]
...
		

References

  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, p. 154.
  • See A007305, A007306, A049455, A049456, etc. for many other references and links about the tree of Farey fractions (of which there are many versions).

Crossrefs

See A294442 for Kepler's tree of fractions.
For the number of distinct numerators in row n, see A293165, and for the distinct denominators see A293160.

Programs

  • Maple
    # S[n] is the list of fractions, written as pairs [i, j], in row n of the triangle of Farey fractions
    S[0]:=[[0, 1], [1, 1]];
    for n from 1 to 6 do
    S[n]:=[[0,1]];
    for k from 1 to nops(S[n-1])-1 do
    a:=S[n-1][k][1]+S[n-1][k+1][1];
    b:=S[n-1][k][2]+S[n-1][k+1][2];
    S[n]:=[op(S[n]), [a, b], S[n-1][k+1]];
    od:
    lprint(S[n]);
    od:

A367795 Triangle read by rows, where row n = L(n) is defined by L(1) = [1,0] and L(n+1) is obtained from L(n) by inserting their binary concatenation between elements x,y.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 6, 2, 4, 0, 1, 14, 6, 26, 2, 20, 4, 8, 0, 1, 30, 14, 118, 6, 218, 26, 106, 2, 84, 20, 164, 4, 72, 8, 16, 0, 1, 62, 30, 494, 14, 1910, 118, 950, 6, 1754, 218, 7002, 26, 3434, 106, 426, 2, 340, 84, 2708, 20, 5284, 164, 1316, 4, 584, 72, 1160, 8, 272, 16, 32, 0
Offset: 1

Views

Author

Luc Rousseau, Nov 30 2023

Keywords

Comments

0 is considered to be a 1-bit-long number and has 0 for binary expansion.
The numbers of bits of the numbers in this triangle are provided by the A049456 triangle.
The sorted set of the numbers that occur in some row of this triangle is provided by A367745.

Examples

			Triangle begins:
  1 0
  1 2 0
  1 6 2 4 0
  1 14 6 26 2 20 4 8 0
  1 30 14 118 6 218 26 106 2 84 20 164 ...
Or the same in binary:
  1 0
  1 10 0
  1 110 10 100 0
  1 1110 110 11010 10 10100 100 1000 0
  1 11110 1110 1110110 110 11011010 11010 1101010 10 1010100 10100 10100100 ...
		

Crossrefs

Programs

  • PARI
    sz(n)=if(n==0, 1, logint(n, 2)+1)
    L(n)=if(n==1, List([1, 0]), my(LL=L(n-1), k=#LL); while(k>1, listinsert(LL, (LL[k-1] << sz(LL[k])) + LL[k], k); k--); LL)
    for(k=1,8,my(l=L(k));for(i=1,#l,print1(l[i],", ")))
    
  • Python
    from itertools import chain, count, islice, zip_longest
    def agen(): # generator of terms
        L = ["1", "0"]
        for k in count(1):
            yield from (int(t, 2) for t in L)
            Lnew = [s+t for s, t in zip(L[:-1], L[1:])]
            L = [t for t in chain(*zip_longest(L, Lnew)) if t is not None]
    print(list(islice(agen(), 69))) # Michael S. Branicky, Nov 30 2023

Formula

Length of row n = #L(n) = 2^(n-1) + 1 = A000051(n-1).

A370857 Let L_1 = (1) and L_2 = (1, 2); for any n > 2, L_n is obtained by inserting one n between each pair of consecutive terms of L_{n-1} coprime to n; a(n) gives the number of n's in L_n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 7, 9, 19, 13, 55, 21, 131, 157, 303, 317, 1039, 393, 2471, 2505, 5643, 6145, 19235, 7413, 40235, 51905, 110435, 110683, 359141, 45877, 764159, 1077437, 2253143, 2251065, 6699111, 2200709, 16009783, 20505321, 43172899, 29699143, 125396929
Offset: 1

Views

Author

Rémy Sigrist, Mar 03 2024

Keywords

Examples

			The first terms, alongside the corresponding lists, are:
  n  a(n)  L_n
  -  ----  ---------------------------------------------
  1     1  (1                                          )
  2     1  (1,                                        2)
  3     1  (1,                            3,          2)
  4     1  (1,                4,          3,          2)
  5     3  (1,          5,    4,    5,    3,    5,    2)
  6     1  (1,    6,    5,    4,    5,    3,    5,    2)
  7     7  (1, 7, 6, 7, 5, 7, 4, 7, 5, 7, 3, 7, 5, 7, 2)
		

Crossrefs

Cf. A049456, A370858 (partials sums).

Programs

  • PARI
    See Links section.

Formula

a(p) = (Sum_{k = 1, p-1} a(k)) - 1 for any odd prime number p.

A064883 Eisenstein array Ei(1,3).

Original entry on oeis.org

1, 3, 1, 4, 3, 1, 5, 4, 7, 3, 1, 6, 5, 9, 4, 11, 7, 10, 3, 1, 7, 6, 11, 5, 14, 9, 13, 4, 15, 11, 18, 7, 17, 10, 13, 3, 1, 8, 7, 13, 6, 17, 11, 16, 5, 19, 14, 23, 9, 22, 13, 17, 4, 19, 15, 26, 11, 29, 18, 25, 7, 24, 17, 27, 10
Offset: 1

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=1 and n=3; see pp. 41-2 of the Eisenstein reference given for A064881. The array for m=n=1 is A049456.
For n >= 1, the number of entries of row n is 2^(n-1)+1 with the difference sequence [2,1,2,4,8,16,...]. Row sums give 4*A007051(n-1).
The binary tree built from the rationals a(n,m)/a(n,m+1), m=0..2^(n-1), for each row n >= 1 gives the subtree of the (Eisenstein-)Stern-Brocot tree in the version of, e.g., Calkin and Wilf (for the reference see A002487, also for the Wilf link) with root 1/3. The composition rule for this tree is i/j -> i/(i+j), (i+j)/j.

Examples

			{1,3}; {1,4,3}; {1,5,4,7,3}; {1,6,5,9,4,11,7,10,3}; ...
This binary subtree of rationals is built from 1/3; 1/4, 4/3; 1/5, 5/4, 4/7, 7/3; ...
		

Programs

  • Mathematica
    nmax = 6; a[n_, m_?EvenQ] := a[n-1, m/2]; a[n_, m_?OddQ] := a[n, m] = a[n-1, (m-1)/2] + a[n-1, (m+1)/2]; a[1, 0] = 1; a[1, 1] = 3; Flatten[ Table[ a[n, m], {n, 1, nmax}, {m, 0, 2^(n-1)}]] (* Jean-François Alcover, Oct 03 2011 *)

Formula

a(n, m) = a(n-1, m/2) if m is even, else a(n, m) = a(n-1, (m-1)/2) + a(n-1, (m+1)/2), a(1, 0)=1, a(1, 1)=3.

A064885 Eisenstein array Ei(3,2).

Original entry on oeis.org

3, 2, 3, 5, 2, 3, 8, 5, 7, 2, 3, 11, 8, 13, 5, 12, 7, 9, 2, 3, 14, 11, 19, 8, 21, 13, 18, 5, 17, 12, 19, 7, 16, 9, 11, 2, 3, 17, 14, 25, 11, 30, 19, 27, 8, 29, 21, 34, 13, 31, 18, 23, 5, 22, 17, 29, 12, 31, 19, 26, 7, 23, 16
Offset: 1

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=3 and n=2; see pp. 41-2 of the Eisenstein reference given for A064881. The array for m=n=1 is A049456.
For n >= 1, the number of entries of row is 2^(n-1)+1 with the difference sequence [2,1,2,4,8,16,...]. Row sums give 5*A007051(n-1).
The binary tree built from the rationals a(n,m)/a(n,m+1), m=0..2^(n-1), for each row n >= 1 gives the subtree of the (Eisenstein-)Stern-Brocot tree in the version of, e.g., Calkin and Wilf (for the reference see A002487, also for the Wilf link) with root 3/2. The composition rule of this tree is i/j -> i/(i+j), (i+j)/j.

Examples

			Triangle begins:
  {3,  2};
  {3,  5,  2};
  {3,  8,  5,  7,  2};
  {3, 11,  8, 13,  5, 12,  7,  9,  2};
  ...
This binary subtree of rationals is built from 3/2; 3/5, 5/2; 3/8, 8/5, 5/7, 7/2; ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 6; a[n_, m_?EvenQ] := a[n - 1, m/2]; a[n_, m_?OddQ] := a[n, m] = a[n - 1, (m - 1)/2] + a[n - 1, (m + 1)/2]; a[1, 0] = 3; a[1, 1] = 2; Flatten[Table[a[n, m], {n, 1, nmax}, {m, 0, 2^(n - 1)}]] (* Jean-François Alcover, Sep 28 2011 *)

Formula

a(n, m) = a(n-1, m/2) if m is even, else a(n, m) = a(n-1, (m-1)/2) + a(n-1, (m+1)/2), a(1, 0) = 3, a(1, 1) = 2.

A375388 A family of squares S(m), m > 0, read by squares and then by rows; square S(1) is [1, 1; 1, 1]; for m > 0, square S(m+1) is obtained by replacing each subsquare [t, u; v, w] in S(m) by [t, t+u, u; t+v, t+u+v+w, u+w; v, v+w, w].

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 3, 2, 3, 1, 3, 9, 6, 9, 3, 2, 6, 4, 6, 2, 3, 9, 6, 9, 3, 1, 3, 2, 3, 1, 1, 4, 3, 5, 2, 5, 3, 4, 1, 4, 16, 12, 20, 8, 20, 12, 16, 4, 3, 12, 9, 15, 6, 15, 9, 12, 3, 5, 20, 15, 25, 10, 25, 15, 20, 5, 2, 8, 6, 10, 4, 10, 6, 8, 2
Offset: 1

Views

Author

Rémy Sigrist, Aug 13 2024

Keywords

Comments

We apply the following substitutions to transform S(m) into S(m+1):
t----t+u----u
| | |
t--u | t+u |
| | --> t+v----+----u+w
v--w | v+w |
| | |
v----v+w----w
This sequence can be seen as a two-dimensional variant of A049456.
The base of T(m) corresponds to the m-th row of A049456.
As A355855, this sequence is related to nonperiodic tilings based on tiles decorated with elements of F_p for some odd prime number p; here we use square tiles, there triangular tiles.

Examples

			S(1) is:
             1 1
             1 1
S(2) is:
            1 2 1
            2 4 2
            1 2 1
S(3) is:
          1 3 2 3 1
          3 9 6 9 3
          2 6 4 6 2
          3 9 6 9 3
          1 3 2 3 1
S(4) is:
  1  4  3  5  2  5  3  4  1
  4 16 12 20  8 20 12 16  4
  3 12  9 15  6 15  9 12  3
  5 20 15 25 10 25 15 20  5
  2  8  6 10  4 10  6  8  2
  5 20 15 25 10 25 15 20  5
  3 12  9 15  6 15  9 12  3
  4 16 12 20  8 20 12 16  4
  1  4  3  5  2  5  3  4  1
		

Crossrefs

Programs

  • PARI
    S(n) = { matrix(2^(n-1)+1, 2^(n-1)+1, i,j, A002487(2^(n-1)-1+i) * A002487(2^(n-1)-1+j)); }

Formula

S(m)(n, k) = A049456(m, n) * A049456(m, k).

A064882 Eisenstein array Ei(2,1).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=2 and n=1; see pp. 41-2 of the Eisenstein reference given for A064881. This is identical with the array for m=1, n=2, given in A064881, read backwards. The array for m=n=1 is A049456.
For n >= 1, the number of entries of row n is 2^(n-1)+1 with the difference sequence [2,1,2,4,8,16,...]. Row sums give 3*A007051(n-1).
The binary tree built from the rationals a(n,m)/a(n,m+1), m=0..2^(n-1), for each row n (n >= 1) gives the subtree of the (Eisenstein-)Stern-Brocot tree in the version of, e.g., Calkin and Wilf (for the reference see A002487, also for the Wilf link) with root 2/1. The composition rule of this tree is i/j -> i/(i+j), (i+j)/j.

Examples

			{2,1}; {2,3,1}; {2,5,3,4,1}; {2,7,5,8,3,7,4,5,1}; ...
This binary subtree of rationals is built from 2/1; 2/3, 3/1; 2/5, 5/3, 3/4, 4/1; ...
		

Programs

  • Mathematica
    nmax = 6; a[n_, m_?EvenQ] := a[n-1, m/2]; a[n_, m_?OddQ] := a[n, m] = a[n-1, (m-1)/2] + a[n-1, (m+1)/2]; a[1, 0] = 2; a[1, 1] = 1; Flatten[ Table[ a[n, m], {n, 1, nmax}, {m, 0, 2^(n-1)}]] (* Jean-François Alcover, Sep 28 2011 *)

Formula

a(n, m) = a(n-1, m/2) if m is even, else a(n, m) = a(n-1, (m-1)/2) + a(n-1, (m+1)/2), a(1, 0)=2, a(1, 1)=1.

A064884 Eisenstein array Ei(3,1).

Original entry on oeis.org

3, 1, 3, 4, 1, 3, 7, 4, 5, 1, 3, 10, 7, 11, 4, 9, 5, 6, 1, 3, 13, 10, 17, 7, 18, 11, 15, 4, 13, 9, 14, 5, 11, 6, 7, 1, 3, 16, 13, 23, 10, 27, 17, 24, 7, 25, 18, 29, 11, 26, 15, 19, 4, 17, 13, 22, 9, 23, 14, 19, 5, 16, 11, 17, 6, 13
Offset: 1

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=3 and n=1; see pp. 41-42 of the Eisenstein reference given for A064881. This is identical with the array for m=1, n=3, given in A064883, read backwards. The array for m=n=1 is A049456.
For n >= 1, the number of entries of row n is 2^(n-1)+1 with the difference sequence [2,1,2,4,8,16,...]. Row sums give 4*A007051(n-1).
The binary tree built from the rationals a(n,m)/a(n,m+1), m=0..2^(n-1), for each row n >= 1 gives the subtree of the (Eisenstein-)Stern-Brocot tree in the version of, e.g., Calkin and Wilf (for the reference see A002487, also for the Wilf link) with root 3/1. The composition rule of this tree is i/j -> i/(i+j), (i+j)/j.

Examples

			Array begins
  {3,  1};
  {3,  4,  1};
  {3,  7,  4,  5,  1};
  {3, 10,  7, 11,  4,  9,  5,  6,  1}; ...
This binary subtree of rationals is built from
  3/1;
  3/4, 4/1;
  3/7, 7/4, 4/5, 5/1; ...
		

Programs

  • Mathematica
    nmax = 6; a[n_, m_?EvenQ] := a[n-1, m/2]; a[n_, m_?OddQ] := a[n, m] = a[n-1, (m-1)/2] + a[n-1, (m+1)/2]; a[1, 0] = 3; a[1, 1] = 1; Flatten[Table[a[n, m], {n, 1, nmax}, {m, 0, 2^(n-1)}]] (* Jean-François Alcover, Sep 28 2011 *)
    eisen = Most@Flatten@Transpose[{#, # + RotateLeft[#]}] &;
    Flatten@NestList[eisen, {3, 1}, 6] (* Harlan J. Brothers, Feb 18 2015 *)

Formula

a(n, m) = a(n-1, m/2) if m is even, else a(n, m) = a(n-1, (m-1)/2) + a(n-1, (m+1)/2), a(1, 0)=3, a(1, 1)=1.
Previous Showing 21-30 of 31 results. Next