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

A334627 T(n,k) is the number of k's in the n-th row of Stern's triangle (A337277); triangle T(n,k), n >= 0, 1 <= k <= A000045(n+1), read by rows.

Original entry on oeis.org

1, 3, 5, 2, 7, 4, 4, 9, 6, 8, 4, 4, 11, 8, 12, 8, 12, 0, 8, 4, 13, 10, 16, 12, 20, 4, 16, 8, 8, 4, 8, 4, 4, 15, 12, 20, 16, 28, 8, 28, 12, 16, 8, 24, 8, 16, 8, 4, 4, 8, 8, 8, 0, 4, 17, 14, 24, 20, 36, 12, 40, 20, 24, 12, 40, 12, 36, 16, 8, 16, 28, 16, 24, 4, 8, 8, 16, 4, 12, 8, 8, 0, 12, 4, 8, 0, 0, 4
Offset: 0

Views

Author

Alois P. Heinz, Sep 09 2020

Keywords

Comments

All terms in the first column are odd, all other terms are even.

Examples

			T(0,1) = 1 because Stern's triangle has one 1 in row n=0.
T(2,2) = 2 because Stern's triangle has two 2's in row n=2.
T(4,3) = 8 because Stern's triangle has eight 3's in row n=4.
Triangle T(n,k) begins:
   1;
   3;
   5,  2;
   7,  4,  4;
   9,  6,  8,  4,  4;
  11,  8, 12,  8, 12, 0,  8,  4;
  13, 10, 16, 12, 20, 4, 16,  8,  8, 4,  8, 4,  4;
  15, 12, 20, 16, 28, 8, 28, 12, 16, 8, 24, 8, 16, 8, 4, 4, 8, 8, 8, 0, 4;
  ...
		

Crossrefs

Column k=1 gives A005408.
Row sums give A126646.
Row lengths give A000045(n+1).

Programs

  • Maple
    b:= 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])(b(n-1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(add(x^j, j=b(n))):
    seq(T(n), n=0..8);

Formula

Sum_{k=1..A000045(n+1)} k * T(n,k) = A000244(n).

A339025 Sum of n-th powers of entries in the n-th row of Stern's triangle (A337277).

Original entry on oeis.org

1, 3, 13, 147, 4277, 314403, 58215317, 27104094867, 31830051961045, 94398513955640643, 709919097675516974293, 13569078873978509433342387, 661668739571948876787281152277, 82526665791586458931717457637364323, 26412772665617176235336349304356162390677
Offset: 0

Views

Author

Alois P. Heinz, Nov 19 2020

Keywords

Crossrefs

Cf. A337277.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, (h-> [1, h[1], seq(
          [h[i-1]+h[i], h[i]][], i=2..nops(h)), 1][])([b(n-1)]))
        end:
    a:= proc(n) option remember; add(i^n, i=[b(n)]) end:
    seq(a(n), n=0..15);
  • Mathematica
    nmax = 15;
    T = Nest[Append[#, Flatten@Join[{1}, If[Length@# > 1, Map[{#1, #1 + #2}& @@ #&, Partition[#[[-1]], 2, 1]], {}], {#[[-1, -1]]}, {1}]]&, {{1}}, nmax];
    a[n_] := T[[n+1]]^n // Total;
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, May 30 2022, after Michael De Vlieger in A337277 *)

A338717 a(n) = sum of 4th powers of entries in row n of Stern's triangle A337277.

Original entry on oeis.org

1, 3, 37, 395, 4277, 46251, 500213, 5409835, 58507765, 632765739, 6843407605, 74011952171, 800444658677, 8656867341099, 93624651434741, 1012557431099947, 10950882439229941, 118434591969329451, 1280878746784164085, 13852797030687146027, 149819009843990278133
Offset: 0

Views

Author

N. J. A. Sloane, Nov 19 2020

Keywords

Crossrefs

Cf. A337277.
For 2nd and 3rd powers see A052984, A169634.

Programs

  • Mathematica
    LinearRecurrence[{10,9,-2},{1,3,37},30] (* Harvey P. Dale, Apr 07 2022 *)

Formula

G.f.: -(2*x^2+7*x-1)/((x+1)*(2*x^2-11*x+1)). - Alois P. Heinz, Nov 19 2020

A106709 Expansion of g.f. -2*x/(1 - 5*x + 2*x^2).

Original entry on oeis.org

0, -2, -10, -46, -210, -958, -4370, -19934, -90930, -414782, -1892050, -8630686, -39369330, -179585278, -819187730, -3736768094, -17045465010, -77753788862, -354678014290, -1617882493726, -7380056440050, -33664517212798, -153562473183890, -700483331493854
Offset: 0

Views

Author

Roger L. Bagula, May 30 2005

Keywords

Comments

Let T(n,k) denote the k-th element of row n of Stern's triangle (see A337277). Then b(n) = Sum_k T(n,k)*T(n,k+1) gives the present sequence (without the signs). - N. J. A. Sloane, Nov 19 2020

Crossrefs

Programs

  • Magma
    I:=[0,-2]; [n le 2 select I[n] else 5*Self(n-1) - 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Sep 10 2021
    
  • Maple
    a:= n-> (<<0|-2>, <1|5>>^n)[1,2]:
    seq(a(n), n=0..25);  # Alois P. Heinz, Nov 19 2020
  • Mathematica
    LinearRecurrence[{5,-2}, {0,-2}, 41] (* G. C. Greubel, Sep 10 2021 *)
  • Sage
    [-round(sqrt(2)^(n+1)*chebyshev_U(n-1, 5/(2*sqrt(2)))) for n in (0..40)] # G. C. Greubel, Sep 10 2021

Formula

a(n) = -2*A107839(n-1), n>0.
a(n) = first entry of v(n), where v(n) = M*v(n-1), M is the 2 X 2 matrix ({0, -2}, {1, 5}) and v(0) is the column vector (0, 1).
G.f.: -2*x/(1-5*x+2*x^2). - Alois P. Heinz, Nov 26 2020
a(n) = -sqrt(2)^(n+1)*ChebyshevU(n-1, 5/(2*sqrt(2))). - G. C. Greubel, Sep 10 2021

Extensions

Edited by N. J. A. Sloane, Apr 30 2006
New name by G. C. Greubel, Sep 10 2021
Showing 1-4 of 4 results.