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 11-20 of 31 results. Next

A064881 Eisenstein array Ei(1,2).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=1 and n=2; see example in given reference p. 42. 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 >= 1 gives the subtree of the (Eisenstein-)Stern-Brocot tree in the version of, e.g., Calkin and Wilf (for the reference see A002487 and the link) with root 1/2. The composition rule for this tree is i/j -> i/(i+j), (i+j)/j.

Examples

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

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] = 2; Flatten[ Table[a[n, m], {n, 1, nmax}, {m, 0, 2^(n - 1)}]] (* Jean-François Alcover, Sep 27 2011 *)
    eisen = Most@Flatten@Transpose[{#, # + RotateLeft[#]}] &;
    Flatten@NestList[eisen, {1, 2}, 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)=1, a(1, 1)=2.

A094967 Right-hand neighbors of Fibonacci numbers in Stern's diatomic series.

Original entry on oeis.org

1, 1, 2, 2, 5, 5, 13, 13, 34, 34, 89, 89, 233, 233, 610, 610, 1597, 1597, 4181, 4181, 10946, 10946, 28657, 28657, 75025, 75025, 196418, 196418, 514229, 514229, 1346269, 1346269, 3524578, 3524578, 9227465, 9227465, 24157817, 24157817, 63245986, 63245986, 165580141, 165580141
Offset: 0

Views

Author

Paul Barry, May 26 2004

Keywords

Comments

Fibonacci(2*n+1) repeated. a(n) is the right neighbor of Fibonacci(n+2) in A049456 and A002487 (starts 2,2,5,...). A000045(n+2) = A094966(n) + a(n).
Diagonal sums of A109223. - Paul Barry, Jun 22 2005
The Fi2 sums, see A180662, of triangle A065941 equal the terms of this sequence. - Johannes W. Meijer, Aug 11 2011
a(n) is the last term of (n+1)-th row in Wythoff array A003603. -Reinhard Zumkeller, Jan 26 2012

Crossrefs

Programs

  • GAP
    List([0..50], n -> Fibonacci(n)*(1-(-1)^n)/2 + Fibonacci(n+1)*(1+(-1)^n)/2); # G. C. Greubel, Nov 18 2018
  • Magma
    [IsEven(n) select Fibonacci(n+1) else Fibonacci(n): n in [0..70]]; // Vincenzo Librandi, Nov 18 2018
    
  • Maple
    A094967 := proc(n) combinat[fibonacci](2*floor(n/2)+1) ; end proc: seq(A094967(n), n=0..37);
  • Mathematica
    LinearRecurrence[{0,3,0,-1},{1,1,2,2},40] (* Harvey P. Dale, Apr 05 2015 *)
    f[n_]:=If[OddQ@n, (Fibonacci[n]), Fibonacci[n+1]]; Array[f, 100, 0] (* Vincenzo Librandi, Nov 18 2018 *)
    Table[Fibonacci[n, 0]*Fibonacci[n] + LucasL[n, 0]*Fibonacci[n + 1]/2, {n, 0, 50}] (* G. C. Greubel, Nov 18 2018 *)
  • PARI
    vector(50, n, n--; fibonacci(n)*(1-(-1)^n)/2 + fibonacci(n+1)*(1+(-1)^n)/2) \\ G. C. Greubel, Nov 18 2018
    
  • Sage
    [fibonacci(n)*(1-(-1)^n)/2 + fibonacci(n+1)*(1+(-1)^n)/2 for n in range(50)] # G. C. Greubel, Nov 18 2018
    

Formula

G.f.: (1+x-x^2-x^3)/(1-3*x^2+x^4).
a(n) = Fibonacci(n)*(1-(-1)^n)/2 + Fibonacci(n+1)*(1+(-1)^n)/2.
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2)+k, 2*k). - Paul Barry, Jun 22 2005
Starting (1, 2, 2, 5, 5, 13, 13, ...) = A133080 * A000045, where A000045 starts with "1". - Gary W. Adamson, Sep 08 2007
a(n) = Fibonacci(n+1)^(4*k+3) mod Fibonacci(n+2), for any k>-1, n>0. - Gary Detlefs, Nov 29 2010

A355855 A family of triangles T(m), m > 0, read by triangles and then by rows; triangle T(1) is [1; 1, 1]; for m > 0, triangle T(m+1) is obtained by replacing each subtriangle [t; u, v] in T(m) by [t; t+u, t+v; u, u+v, v].

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 19 2022

Keywords

Comments

We apply the following substitutions to transform T(m) into T(m+1):
t
/ \
t / \
/ \ --> t+u---t+v
u---v / \ / \
/ \ / \
u----u+v----v
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.
T(m) has 2^(m-1)+1 rows, and largest term 2^(m-1).
As m gets larger, T(m) exhibits interesting fractal features (see illustrations in Links section).

Examples

			T(1) is:
          1
         1 1
T(2) is:
          1
         2 2
        1 2 1
T(3) is:
          1
         3 3
        2 4 2
       3 4 4 3
      1 3 2 3 1
T(4) is:
          1
         4 4
        3 6 3
       5 7 7 5
      2 6 4 6 2
     5 6 8 8 6 5
    3 7 4 8 4 7 3
   4 6 7 6 6 7 6 4
  1 4 3 5 2 5 3 4 1
		

Crossrefs

Cf. A049456.

Programs

  • PARI
    See Links section.
    
  • PARI
    T(m,n,k) = { if (m==1, 1, my (nn=(n+1)\2, kk=(k+1)\2); if (n%2==1 && k%2==1, T(m-1, nn, kk), n%2==1 && k%2==0, T(m-1, nn, kk) + T(m-1, nn, kk+1), n%2==0 && k%2==1, T(m-1, nn, kk) + T(m-1, nn+1, kk), T(m-1, nn, kk) + T(m-1, nn+1, kk+1))) }

A070878 Stern's diatomic array read by rows (version 2).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 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
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2002

Keywords

Comments

Row n has length 2^n + 1.

Examples

			Triangle begins:
1,0;
1,1,0;
1,2,1,1,0;
1,3,2,3,1,2,1,1,0;
...
		

Crossrefs

Rows sums are A007051. See A293160 for number of distinct terms in each row.

Programs

  • Mathematica
    row[1] = {1, 0}; row[n_] := row[n] = (r = row[n-1]; Riffle[r, Most[r + RotateLeft[r]]]); Flatten[ Table[row[n], {n, 1, 7}]] (* Jean-François Alcover, Nov 03 2011 *)
    Flatten[NestList[Riffle[#,Total/@Partition[#,2,1]]&,{1,0},6]] (* Harvey P. Dale, Dec 06 2014 *)

Formula

Each row is obtained by copying the previous row but interpolating the sums of pairs of adjacent terms. E.g. after 1 2 1 1 0 we get 1 1+2 2 2+1 1 1+1 1 1+0 0.

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 07 2003

A070879 Stern's diatomic array read by rows (version 3 - same as version 2, A070878, but with final 0 in each row omitted).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 3, 1, 2, 1, 1, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 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, 1, 5, 4, 7, 3, 8
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2002

Keywords

Comments

Row n has length 2^n.
From Yosu Yurramendi, Apr 08 2019: (Start)
The terms (n>0) may be written as a left-justified array with rows of length 2^m:
1,
1, 1,
1, 2, 1, 1,
1, 3, 2, 3, 1, 2, 1, 1,
1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1,
1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4,...
as well as right-justified fashion:
1,
1, 1,
1, 2, 1, 1,
1, 3, 2, 3, 1, 2, 1, 1,
1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1,
... , 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1,
...
For properties see FORMULA section.
(End)

Crossrefs

Rows sums are A007051.

Formula

From Yosu Yurramendi, Apr 08 2019: (Start)
a(2^(m+1)+k-1) = A002487(2^m+k); a(2^(m+1)+2^m+k-1) = a(2^m+k-1) for m >= 0, 0 <= k < 2^m.
a(2^(m+1)-1-(k+1)) = A002487(k+1); a(2^(m+1)+k) - a(2^m+k) = A002487(k) for m >= 0, 0 <= k < 2^m.
a(2^m-1) = 1 for m >= 0; a(2^(m+1)+k-1) = a(2^(m+1)-k-1) + a(2^m+k-1) for m >= 0, 0 < k < 2^m.
a(2^m+2^m'+k'-1) = a(2^(m'+1)+k'-1)*(m-m'-1) + a(2^m'+k'-1) for m >= 1, 0 <= m' < m, 0 <= k' < 2^m'.
(End)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 07 2003

A094966 Left-hand neighbors of Fibonacci numbers in Stern's diatomic series.

Original entry on oeis.org

0, 1, 1, 3, 3, 8, 8, 21, 21, 55, 55, 144, 144, 377, 377, 987, 987, 2584, 2584, 6765, 6765, 17711, 17711, 46368, 46368, 121393, 121393, 317811, 317811, 832040, 832040, 2178309, 2178309, 5702887, 5702887, 14930352, 14930352, 39088169, 39088169
Offset: 0

Views

Author

Paul Barry, May 26 2004

Keywords

Comments

Fibonacci(2n) repeated. a(n) is the left neighbor of Fibonacci(n+2) in A002487 and A049456. A000045(n+2) = a(n)+A094967(n).

Crossrefs

Cf. A001906.

Programs

  • Magma
    [Fibonacci(n)*(1+(-1)^n)/2 + Fibonacci(n+1)*(1-(-1)^n)/2: n in [0..40]]; // Vincenzo Librandi, Mar 29 2016
  • Mathematica
    CoefficientList[Series[x (1 + x)/(1 - 3 x^2 + x^4), {x, 0, 38}], x] (* Michael De Vlieger, Mar 28 2016 *)
  • PARI
    concat(0, Vec(x*(1+x)/(1-3*x^2+x^4) + O(x^50))) \\ Colin Barker, Mar 28 2016
    

Formula

G.f.: x*(1+x) / (1-3*x^2+x^4).
a(n) = Fibonacci(n)*(1+(-1)^n)/2 + Fibonacci(n+1)*(1-(-1)^n)/2.
a(n) = (2^(-2-n)*((1-sqrt(5))^n*(-3+sqrt(5)) - (-1-sqrt(5))^n*(-1+sqrt(5)) - (-1+sqrt(5))^n - sqrt(5)*(-1+sqrt(5))^n + 3*(1+sqrt(5))^n + sqrt(5)*(1+sqrt(5))^n))/sqrt(5). - Colin Barker, Mar 28 2016

A337277 Stern's triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 3, 2, 3, 1, 3, 2, 3, 1, 2, 1, 1, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 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, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Sep 09 2020

Keywords

Comments

The first two rows are 1, then 1,1,1. To get row n, copy row n-1, and insert c+d between every pair of adjacent terms c,d, and finally insert a 1 at the beginning and end of the row.
The maximum value in row n is A000045(n+1). - Alois P. Heinz, Sep 09 2020

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 1, 2, 1, 2, 1, 1;
  1, 1, 2, 1, 3, 2, 3, 1, 3, 2, 3, 1, 2, 1, 1;
  1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1;
  ...
		

References

  • Stanley, Richard P. "Some Linear Recurrences Motivated by Stern’s Diatomic Array." The American Mathematical Monthly 127.2 (2020): 99-111.

Crossrefs

Row sums give A000244.
Row lengths give A126646.

Programs

  • Maple
    T:= proc(n) option remember; `if`(n=0, 1, (L-> [1, L[1], seq(
          [L[i-1]+L[i], L[i]][], i=2..nops(L)), 1][])([T(n-1)]))
        end:
    seq(T(n), n=0..6);  # Alois P. Heinz, Sep 09 2020
  • Mathematica
    Nest[Append[#, Flatten@ Join[{1}, If[Length@ # > 1, Map[{#1, #1 + #2} & @@ # &, Partition[#[[-1]], 2, 1] ], {}], {#[[-1, -1]]}, {1}]] &, {{1}}, 5] // Flatten (* Michael De Vlieger, Sep 09 2020 *)

Formula

T(n,n) = A002487(n+1). - Alois P. Heinz, Sep 09 2020

A064886 Eisenstein array Ei(2,3).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Oct 19 2001

Keywords

Comments

In Eisenstein's notation this is the array for m=2 and n=3; see pp. 41-2 of the Eisenstein reference given for A064881. This is identical with the array for m=3, n=2, given in A064885, read backwards. The array for m=n=1 is A049456.
For n >= 1, the number of entries of row n >= 1 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 2/3. The composition rule of this tree is i/j -> i/(i+j), (i+j)/j.

Examples

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

Programs

  • Mathematica
    a[1, 0] = 2; a[1, 1] = 3; a[n_ /; n >= 1, m_ /; m >= 0] := If[EvenQ[m], a[n, m] = a[n-1, m/2], a[n, m] = a[n-1, (m-1)/2] + a[n-1, (m+1)/2]]; Table[a[n, m], {n, 1, 6}, {m, 0, 2^(n-1)}] // Flatten (* Jean-François Alcover, Feb 27 2018 *)

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)=3.

A174868 Partial sums of Stern's diatomic series A002487.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 10, 13, 14, 18, 21, 26, 28, 33, 36, 40, 41, 46, 50, 57, 60, 68, 73, 80, 82, 89, 94, 102, 105, 112, 116, 121, 122, 128, 133, 142, 146, 157, 164, 174, 177, 188, 196, 209, 214, 226, 233, 242, 244, 253, 260, 272, 277, 290, 298, 309, 312, 322, 329, 340, 344, 353, 358, 364, 365, 372, 378, 389, 394, 408, 417, 430, 434, 449, 460, 478, 485, 502, 512, 525, 528, 542, 553, 572, 580, 601, 614, 632, 637, 654, 666, 685
Offset: 0

Views

Author

Jonathan Vos Post, Dec 01 2010

Keywords

Comments

After the initial 0, identical to A007729.

Examples

			a(16) = 0 + 1 + 1 + 2 + 1 + 3 + 2 + 3 + 1 + 4 + 3 + 5 + 2 + 5 + 3 + 4 + 1 = 41.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[EvenQ[n], 2*a[n/2] + a[n/2 - 1], 2*a[(n - 1)/2] + a[(n + 1)/2]]; a[0] = 0; a[1] = 1; Array[a, 100, 0] (* Amiram Eldar, May 18 2023 *)
  • Python
    from itertools import accumulate, count, islice
    from functools import reduce
    def A174868_gen(): # generator of terms
        return accumulate((sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0))) for n in count(1)),initial=0)
    A174868_list = list(islice(A174868_gen(),30)) # Chai Wah Wu, May 07 2023

Formula

a(n) = Sum_{i=0..n} A002487(i).
G.f.: (x/(1 - x))*Product_{k>=0} (1 + x^(2^k) + x^(2^(k+1))). - Ilya Gutkovskiy, Feb 27 2017
a(2k) = 2*a(k) + a(k-1); a(2k+1) = 2*a(k) + a(k+1). - Michael J. Collins, Dec 25 2018
a(n) = n^log_2(3) + Psi_D(log_2(n)) + O(n^log_2(phi)), where phi is the golden ratio (A001622) and Psi_D is a 1-periodic continuous function which is Hölder continuous with any exponent smaller than log_2(3/phi) (Heuberger et al., 2022). - Amiram Eldar, May 18 2023

A293165 Number of distinct terms in row n of A049455.

Original entry on oeis.org

2, 2, 3, 4, 6, 8, 14, 21, 32, 49, 79, 119, 192, 301, 466, 735, 1176, 1851, 2927, 4598, 7297, 11553, 18279, 28864, 45833, 72357, 114743, 181722, 287927, 455749, 722459, 1144371, 1813976, 2873752, 4553644, 7213621, 11432170, 18120734, 28716295, 45491134
Offset: 1

Views

Author

N. J. A. Sloane, Oct 15 2017

Keywords

Comments

Equals A293160(n+1)+1.

Crossrefs

Previous Showing 11-20 of 31 results. Next