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

A346831 Table read by rows, coefficients of the characteristic polynomials of the tangent matrices.

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 2, -1, -2, 1, 1, 0, -6, 0, 1, 4, 9, -4, -10, 0, 1, -1, 0, 15, 0, -15, 0, 1, 14, -1, -46, 19, 34, -19, -2, 1, 1, 0, -28, 0, 70, 0, -28, 0, 1, 40, 81, -88, -196, 56, 150, -8, -36, 0, 1, -1, 0, 45, 0, -210, 0, 210, 0, -45, 0, 1
Offset: 0

Views

Author

Peter Luschny, Sep 11 2021

Keywords

Comments

The tangent matrix M(n, k) is an N X N matrix defined with h = floor((N+1)/2) as:
M[n - k, k + 1] = if n < h then 1 otherwise -1,
M[N - n + k + 1, N - k] = if n < N - h then -1 otherwise 1,
for n in [1..N-1] and for k in [0..n-1], and 0 in the main antidiagonal.
The name 'tangent matrix' derives from M(n, k) = signum(tan(Pi*(n + k)/(N + 1))) whenever the right side of this equation is defined.

Examples

			Table starts:
[0]  1;
[1]  0,  1;
[2] -1,  0,   1;
[3]  2, -1,  -2,    1;
[4]  1,  0,  -6,    0,   1;
[5]  4,  9,  -4,  -10,   0,   1;
[6] -1,  0,  15,    0, -15,   0,   1;
[7] 14, -1, -46,   19,  34, -19,  -2,   1;
[8]  1,  0, -28,    0,  70,   0, -28,   0, 1;
[9] 40, 81, -88, -196,  56, 150,  -8, -36, 0, 1.
.
The first few tangent matrices:
1       2          3              4                  5
---------------------------------------------------------------
0;   -1  0;    1  -1  0;    1  -1  -1   0;   1   1  -1  -1   0;
      0  1;   -1   0  1;   -1  -1   0   1;   1  -1  -1   0   1;
               0   1  1;   -1   0   1   1;  -1  -1   0   1   1;
                            0   1   1  -1;  -1   0   1   1   1;
                                             0   1   1   1  -1;
		

Crossrefs

Cf. A135670, A152011, A346837 (generalized tangent matrix).

Programs

  • Julia
    using AbstractAlgebra
    function TangentMatrix(N)
        M = zeros(ZZ, N, N)
        H = div(N + 1, 2)
        for n in 1:N - 1
            for k in 0:n - 1
                M[n - k, k + 1] = n < H ? 1 : -1
                M[N - n + k + 1, N - k] = n < N - H ? -1 : 1
            end
        end
    M end
    function A346831Row(n)
        n == 0 && return [ZZ(1)]
        R, x = PolynomialRing(ZZ, "x")
        S = MatrixSpace(ZZ, n, n)
        M = TangentMatrix(n)
        c = charpoly(R, S(M))
        collect(coefficients(c))
    end
    for n in 0:9 println(A346831Row(n)) end
  • Maple
    TangentMatrix := proc(N) local M, H, n, k;
       M := Matrix(N, N); H := iquo(N + 1, 2);
       for n from 1 to N - 1 do for k from 0 to n - 1 do
           M[n - k, k + 1] := `if`(n < H, 1, -1);
           M[N - n + k + 1, N - k] := `if`(n < N - H, -1, 1);
    od od; M end:
    A346831Row := proc(n) if n = 0 then return 1 fi;
       LinearAlgebra:-CharacteristicPolynomial(TangentMatrix(n), x);
       seq(coeff(%, x, k), k = 0..n) end:
    seq(A346831Row(n), n = 0..10);
  • Mathematica
    TangentMatrix[N_] := Module[{M, H, n, k},
       M = Array[0&, {N, N}]; H = Quotient[N + 1, 2];
       For[n = 1, n <= N - 1, n++, For[k = 0, k <= n - 1, k++,
          M[[n - k, k + 1]] = If[n < H, 1, -1];
          M[[N - n + k + 1, N - k]] = If[n < N - H, -1, 1]]]; M];
    A346831Row[n_] := Module[{c}, If[n == 0,  Return[{1}]];
    c = CharacteristicPolynomial[TangentMatrix[n], x];
    (-1)^n*CoefficientList[c, x]];
    Table[A346831Row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 15 2024, after Peter Luschny *)

Formula

The rows with even index equal those of A135670.
The determinants of tangent matrices with even dimension are A152011.

A305492 a(n) = ((1 + y)^n - (1 - y)^n)/y with y = sqrt(8).

Original entry on oeis.org

0, 2, 4, 22, 72, 298, 1100, 4286, 16272, 62546, 238996, 915814, 3504600, 13419898, 51371996, 196683278, 752970528, 2882724002, 11036241700, 42251551414, 161756794728, 619274449354, 2370846461804, 9076614069086, 34749153370800
Offset: 0

Views

Author

Peter Luschny, Jun 02 2018

Keywords

Examples

			Array ((1+y)^n - (1-y)^n)/y with y = sqrt(k).
[k\n]
[1]   1, 2, 4,  8, 16, 32,   64,  128,    256,   512,   1024, ...
[2]   0, 2, 4, 10, 24, 58,  140,  338,    816,  1970,   4756, ...
[3]   0, 2, 4, 12, 32, 88,  240,  656,   1792,  4896,  13376, ...
[4]   0, 2, 4, 14, 40, 122, 364,  1094,  3280,  9842,  29524, ...
[5]   0, 2, 4, 16, 48, 160, 512,  1664,  5376, 17408,  56320, ...
[6]   0, 2, 4, 18, 56, 202, 684,  2378,  8176, 28242,  97364, ...
[7]   0, 2, 4, 20, 64, 248, 880,  3248, 11776, 43040, 156736, ...
[8]   0, 2, 4, 22, 72, 298, 1100, 4286, 16272, 62546, 238996, ...
[9]   0, 2, 4, 24, 80, 352, 1344, 5504, 21760, 87552, 349184, ...
		

Crossrefs

Let f(n, y) = ((1 + y)^n - (1 - y)^n)/y.
f(n, 1 ) = A000079(n);
f(n, sqrt(2)) = A163271(n+1);
f(n, sqrt(3)) = A028860(n+2);
f(n, 2 ) = A152011(n) for n>0;
f(n, sqrt(5)) = A103435(n);
f(n, sqrt(6)) = A083694(n);
f(n, sqrt(7)) = A274520(n);
f(n, sqrt(8)) = a(n);
f(n, 3 ) = A192382(n+1);
Cf. A305491.
Equals 2 * A015519.

Programs

  • Maple
    egf :=  (n,x) -> 2*exp(x)*sinh(sqrt(n)*x)/sqrt(n):
    ser := series(egf(8,x), x, 26):
    seq(n!*coeff(ser,x, n), n=0..24);
  • Mathematica
    Table[Simplify[((1 + Sqrt[8])^n - (1 - Sqrt[8])^n)/ Sqrt[8]], {n, 0, 24}]
  • PARI
    concat(0, Vec(2*x / (1 - 2*x - 7*x^2) + O(x^40))) \\ Colin Barker, Jun 05 2018

Formula

E.g.f.: 2*exp(x)*sinh(sqrt(n)*x)/sqrt(n) for n = 8.
From Colin Barker, Jun 02 2018: (Start)
G.f.: 2*x / (1 - 2*x - 7*x^2).
a(n) = 2*a(n-1) + 7*a(n-2) for n>1.
(End)

A228815 Symmetric triangle, read by rows, related to Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 5, 5, 2, 3, 10, 14, 10, 3, 5, 20, 36, 36, 20, 5, 8, 38, 83, 106, 83, 38, 8, 13, 71, 182, 281, 281, 182, 71, 13, 21, 130, 382, 690, 834, 690, 382, 130, 21, 34, 235, 778, 1606, 2268, 2268, 1606, 778, 235, 34, 55, 420, 1546, 3586, 5780, 6750
Offset: 0

Views

Author

Philippe Deléham, Oct 30 2013

Keywords

Comments

Triangles satisfying the same recurrence: A091533, A091562, A185081, A205575, A209137, A209138.

Examples

			Triangle begins :
0
1, 1
1, 2, 1
2, 5, 5, 2
3, 10, 14, 10, 3
5, 20, 36, 36, 20, 5
8, 38, 83, 106, 83, 38, 8
13, 71, 182, 281, 281, 182, 71, 13
21, 130, 382, 690, 834, 690, 382, 130, 21
34, 235, 778, 1606, 2268, 2268, 1606, 778, 235, 34
55, 420, 1546, 3586, 5780, 6750, 5780, 3586, 1546, 420, 55
		

Crossrefs

Cf. A000045 (1st column), A001629 (2nd column), A008998, A152011, A261055 (3rd column).

Formula

G.f.: x*(1+y)/(1-x-x*y-x^2-x^2*y-x^2*y^2).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0) = 0, T(1,0) = T(1,1) = 1, T(n,k) = 0 if k<0 or if k>n.
Sum_{k = 0..n} T(n,k)*x^k = A000045(n), 2*A015518(n), 3*A015524(n), 4*A200069(n) for x = 0, 1, 2, 3 respectively.
Sum_{k = 0..floor(n/2)} T(n-k,k) = A008998(n+1).

A136423 Floor((x^n - (1-x)^n)/2 +.5) where x = (sqrt(4)+1)/2 = 3/2.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 13, 19, 29, 43, 65, 97, 146, 219, 328, 493, 739, 1108, 1663, 2494, 3741, 5611, 8417, 12626, 18938, 28408, 42611, 63917, 95876, 143813, 215720, 323580, 485370, 728055, 1092082, 1638123, 2457185, 3685777, 5528666, 8292999
Offset: 1

Views

Author

Cino Hilliard, Apr 01 2008

Keywords

Comments

This is analogous to the closed form of the formula for the n-th Fibonacci number. Even before truncation, these numbers are rational and the decimal part always ends in 5. For x=(sqrt(4)+1)/2=3/2, a(n)/a(n-1) -> x.

Programs

  • PARI
    g(n,r) = for(m=1,n,print1(fib(m,r)",")) fib(n,r) = x=(sqrt(r)+1)/2;floor((x^n-(1-x)^n)/sqrt(r)+.5)

Formula

The general form of x is (sqrt(r)+1)/2, r=1,2,3..
a(n) = floor(b(n)/2^n) where b(n) = 2^(n-1)+A152011(n). - R. J. Mathar, Sep 10 2016

A169629 Array T(n,k) read by antidiagonals: T(n,k) = Sum_{v=1..n, v odd} binomial(n,v)*k^v.

Original entry on oeis.org

1, 2, 2, 4, 4, 3, 8, 14, 6, 4, 16, 40, 36, 8, 5, 32, 122, 120, 76, 10, 6, 64, 364, 528, 272, 140, 12, 7, 128, 1094, 2016, 1684, 520, 234, 14, 8, 256, 3280, 8256, 7448, 4400, 888, 364, 16, 9, 512, 9842, 32640, 40156, 21280, 9966, 1400, 536, 18, 10
Offset: 1

Views

Author

Roger L. Bagula, Mar 03 2010

Keywords

Comments

Antidiagonal sums are: 1, 4, 11, 32, 105, 366, 1387, ...

Examples

			   1,    2,    3,     4,      5,      6,       7, ...
   2,    4,    6,     8,     10,     12,      14, ...
   4,   14,   36,    76,    140,    234,     364, ...
   8,   40,  120,   272,    520,    888,    1400, ...
  16,  122,  528,  1684,   4400,   9966,   20272, ...
  32,  364, 2016,  7448,  21280,  51012,  107744, ...
  64, 1094, 8256, 40156, 148160, 450834, 1188544, ...
		

Crossrefs

Cf. A152011.
Cf. A005843 (2nd line), A079908 (3rd line), A105374 (4th line).

Programs

  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, nn, print1(sum(v=1, n, (v%2)*binomial(n, v)*k^v), ", ");); print(););} \\ Michel Marcus, Jul 22 2015
Showing 1-5 of 5 results.