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.

A364553 Number of edges in the n-Pell graph.

Original entry on oeis.org

0, 1, 5, 18, 58, 175, 507, 1428, 3940, 10701, 28705, 76230, 200766, 525083, 1365175, 3531240, 9093512, 23325785, 59625981, 151947066, 386139650, 978834759, 2475645491, 6248406780, 15740857452, 39585199525, 99389810585, 249177006702, 623846750086, 1559888545075
Offset: 0

Views

Author

Eric W. Weisstein, Jul 28 2023

Keywords

Comments

For n > 0, also the number of maximum and maximal cliques in the n-Pell graph.

Crossrefs

Programs

  • Maple
    A364553 := n -> (n/8)*((2 + sqrt(2))*(1 + sqrt(2))^n - (sqrt(2) - 2)*(1 - sqrt(2))^n): seq(simplify(A364553(n)), n=0..29); # Peter Luschny, Jul 30 2023
  • Mathematica
    Table[n Fibonacci[n + 1, 2]/2, {n, 0, 20}]
    Table[n (Fibonacci[n, 2] + (-I)^n ChebyshevT[n, I])/2, {n, 0, 20}]
    Table[With[{s = Sqrt[2]}, n ((s + 2) (1 + s)^n - (s - 2) (1 - s)^n)/8], {n, 0, 20}] // Expand
    LinearRecurrence[{4, -2, -4, -1}, {0, 1, 5, 18}, 20]
    CoefficientList[Series[x (1 + x)/(-1 + 2 x + x^2)^2, {x, 0, 20}], x]
  • Python
    # Using function 'delannoy_row' from A008288.
    def A364553(n:int) -> int:
        return sum(k * delannoy_row(n)[k] for k in range(n + 1))
    print([A364553(n) for n in range(30)])  # Peter Luschny, Jul 30 2023

Formula

a(n) = n*(A000129(n) + A001333(n))/2.
a(n) = n*A000129(n+1)/2.
a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) - a(n-4).
G.f.: x*(1+x)/(-1+2*x+x^2)^2.
From Peter Luschny, Jul 31 2023: (Start)
a(n) = (n/8)*((2 + sqrt(2))*(1 + sqrt(2))^n - (sqrt(2) - 2)*(1 - sqrt(2))^n).
With this formula, the sequence can be continued to the left half of the number line: a(-n) = -(-1)^n*A026937(n-2) for n >= 0.
a(n) = (A093967(n) + A364636(n)) / 2.
a(n) = Sum_{k=0..n} k * A008288(n, k). (End)

A088210 Numerators of convergents of the continued fraction with the n+1 partial quotients: [2;2,2,...(n 2's)...,2,n+1], starting with [1], [2;2], [2;2,3], [2;2,2,4], ...

Original entry on oeis.org

1, 5, 17, 53, 157, 449, 1253, 3433, 9273, 24765, 65529, 172061, 448853, 1164409, 3006157, 7728337, 19794545, 50532469, 128621281, 326513669, 826887693, 2089505841, 5269572021, 13265211961, 33336792745, 83648953133, 209591807177
Offset: 0

Views

Author

Paul D. Hanna, Sep 23 2003

Keywords

Comments

Denominators are A088211. Partial sums form A054459. Second differences form A026937.

Examples

			a(3)/A088211(3) = [2;2,2,4] = 53/22.
		

References

  • R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149. (See the foot of page 136.)

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, -2, -4, -1}, {1, 5, 17, 53}, 30] (* Paolo Xausa, Feb 08 2024 *)

Formula

G.f.: (1+x)(1-x^2)/(1-2*x-x^2)^2.
a(n) = A000129(n) + (n+1)*A000129(n+1) where A000129 are the Pell numbers. [Corrected by Paolo Xausa, Feb 08 2024]

A164981 A triangle with Pell numbers in the first column.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 12, 10, 4, 1, 29, 30, 16, 5, 1, 70, 87, 56, 23, 6, 1, 169, 245, 185, 91, 31, 7, 1, 408, 676, 584, 334, 136, 40, 8, 1, 985, 1836, 1784, 1158, 546, 192, 50, 9, 1, 2378, 4925, 5312, 3850, 2052, 834, 260, 61, 10, 1, 5741, 13079, 15497, 12386, 7342, 3366, 1212, 341, 73, 11, 1
Offset: 1

Views

Author

Mark Dols, Sep 03 2009

Keywords

Comments

Rows sum up to A000244 (powers of 3), diagonals to A001654 (golden rectangles).
Up to reflection at the vertical axis, the triangle of numbers given here coincides with the triangle given in A210557, i.e. the numbers are the same just read row-wise in the opposite direction. [Christine Bessenrodt, Jul 20 2012]
Subtriangle of (0, 2, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 10 2013

Examples

			Triangle begins
  1
  2,1
  5,3,1
  12,10,4,1
  29,30,16,5,1
  70,87,56,23,6,1
  169,245,185,91,31,7,1
  ...
From _Philippe Deléham_, Oct 10 2013: (Start)
Triangle (0, 2, 1/2, -1/2, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, ...):
  1
  0, 1
  0, 2, 1
  0, 5, 3, 1
  0, 12, 10, 4, 1
  0, 29, 30, 16, 5, 1
  0, 70, 87, 56, 23, 6, 1
  0, 169, 245, 185, 91, 31, 7, 1
  ... (End)
		

Crossrefs

Programs

  • Maple
    A164981 := proc(n,k) option remember; if n <1 or k<1 or k>n then 0; elif n = 1 then 1; else 2*procname(n-1,k)+procname(n-1,k-1)+procname(n-2,k)-procname(n-2,k-1) ; end if; end proc:
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n < 1 || k < 1 || k > n, 0, n == 1, 1, True, 2*T[n-1, k] + T[n-1, k-1] + T[n-2, k] - T[n-2, k-1]];
    Table[T[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 06 2023 *)
  • PARI
    T(n,k) = if ((n==1) && (k==1), return(1)); if ((n<=0) || (k<=0) || (nMichel Marcus, Feb 01 2023

Formula

From R. J. Mathar, Jan 27 2011: (Start)
T(1,1) =1. T(n,k)=0 if n<1 or k<1 or k>n. T(n,k) = 2*T(n-1,k)+T(n-1,k-1)+T(n-2,k)-T(n-2,k-1) otherwise.
T(n,1) = A000129(n).
T(n,n-1) = n.
T(n,n-2) = A052905(n-2).
T(n,2) = A026937(n-2). (End)
G.f. x*y/(1-2*x-x^2+x^2*y-x*y). - R. J. Mathar, Aug 11 2015

Extensions

Rows 10-11 from Michel Marcus, Feb 01 2023

A103415 Triangle, read by rows, T(n,k) = A000129(n+1) - Sum_{j=1..k} t(n+1, j), where t(n, k) is defined in the formula section.

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 12, 11, 6, 1, 29, 28, 21, 8, 1, 70, 69, 60, 35, 10, 1, 169, 168, 157, 116, 53, 12, 1, 408, 407, 394, 333, 204, 75, 14, 1, 985, 984, 969, 884, 653, 332, 101, 16, 1, 2378, 2377, 2360, 2247, 1870, 1189, 508, 131, 18, 1, 5741, 5740, 5721, 5576, 5001, 3712, 2029, 740, 165, 20, 1
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.net) and Gary W. Adamson, Feb 04 2005

Keywords

Comments

Triangle is generated from the product A*B of the infinite lower triangular matrices A = A008288(n,k) and B =
1;
1 1;
1 1 1;
1 1 1 1; ...
Determinant(A*B) = 1 for all n.
Absolute values of coefficients of characteristic polynomials of n-th matrix are the (n+1)-th row of A007318 (Pascal's triangle). As they are:
x^1 - 1;
x^2 - 2*x^1 + 1;
x^3 - 3*x^2 + 3*x^1 - 1;
x^4 - 4*x^3 + 6*x^2 - 4*x^1 + 1;
x^5 - 5*x^4 + 10*x^3 - 10*x^2 + 5*x^1 - 1.

Examples

			Triangle begins as:
    1;
    2,   1;
    5,   4,   1;
   12,  11,   6,   1;
   29,  28,  21,   8,   1;
   70,  69,  60,  35,  10,  1;
  169, 168, 157, 116,  53, 12,  1;
  408, 407, 394, 333, 204, 75, 14, 1;
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_]:= If[k==0, (2*Boole[n<2] + LucasL[n-1, 2]*Boole[n>1])/2, Binomial[n-1, k-1]*Hypergeometric2F1[1-k, k-n, 1-n, -1]];
    st[n_, k_]:= Sum[t[n+1, j], {j,k}];
    T[n_, k_]:= Fibonacci[n+1, 2] - st[n, k];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, May 25 2021 *)
  • PARI
    Pell(n) = if( n<2, n, 2*Pell(n-1) + Pell(n-2) );
    t(n, k) = if(n<3, 1, if(k==1||k==n, 1, t(n-1,k) + t(n-1,k-1) + t(n-2,k-1) ));
    st(n, k) = sum(i=1, k, t(n+1,i));
    T(n, k) = Pell(n+1) - st(n,k);
    for(n=0, 10, for(k=0, n, print1(T(n,k), ",")); print()) \\ modified by G. C. Greubel, May 25 2021
    
  • Sage
    @CachedFunction
    def t(n,k): return 1 if (n<3) else 1 if (k==1 or k==n) else t(n-1,k) + t(n-1,k-1) + t(n-2,k-1)
    def st(n,k): return sum(t(n+1, j) for j in (1..k))
    def T(n,k): return lucas_number1(n+1,2,-1) - st(n,k)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 25 2021

Formula

T(n, k) = Pell(n+1) - ST(n, k), where ST(n, k) = Sum_{j=1..k} t(n+1, j), t(n, k) = t(n-1,k) + t(n-1,k-1) + t(n-2,k-1), t(n, 1) = t(n, n) = 1 and t(0, k) = t(1, k) = t(2, k) = 1.
T(n, 0) = A000129(n+1).
T(n, 1) = A005409(n) = A000129(n) - 1.
Sum_{k=0..n} T(n, k) = A026937(n).
From G. C. Greubel, May 25 2021: (Start)
T(n, k) = A000129(n+1) - st(n,k), where st(n, k) = Sum_{j=1..k} t(n+1, j), t(n, k) = A008288(n-1, k-1) for n >= 1 and k >= 1, and t(n, 0) = (1/2)*(2*[n<2] + A002203(n-1)*[n>1]).
T(n, n) = A000012(n).
T(n, n-1) = A005843(n+1).
T(n, n-2) = A093328(n-1).
T(n, n-3) = (4/3)*((n-3)^3 + 5*(n-3) + 3).
T(n, n-4) = (1/3)*(2*(n-4)^2 + 22*(n-4)^2 + 22*(n-4) + 39). (End)
Showing 1-4 of 4 results.