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.

A103450 A figurate number triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 12, 7, 1, 1, 9, 22, 22, 9, 1, 1, 11, 35, 50, 35, 11, 1, 1, 13, 51, 95, 95, 51, 13, 1, 1, 15, 70, 161, 210, 161, 70, 15, 1, 1, 17, 92, 252, 406, 406, 252, 92, 17, 1, 1, 19, 117, 372, 714, 882, 714, 372, 117, 19, 1, 1, 21, 145, 525, 1170, 1722, 1722, 1170, 525, 145, 21, 1
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

Row coefficients are the absolute values of the coefficients of the characteristic polynomials of the n X n matrices A(n) with A(n){i,i} = 2, i>0, A(n){i,j} = 1, otherwise (starts with (0,0) position).
The triangle can be generated by the matrix multiplication A007318 * A114219s, where A114219s = 0; 0,1; 0,1,1; 0,-1,2,1; 0,1,-2,3,1; 0,-1,2,-3,4,1; ... = A097807 * A128229 is a signed variant of A114219. - Gary W. Adamson, Feb 20 2007

Examples

			From _Roger L. Bagula_, Oct 21 2008: (Start)
The triangle begins:
  1;
  1,  1;
  1,  3,   1;
  1,  5,   5,   1;
  1,  7,  12,   7,   1;
  1,  9,  22,  22,   9,   1;
  1, 11,  35,  50,  35,  11,   1;
  1, 13,  51,  95,  95,  51,  13,   1;
  1, 15,  70, 161, 210, 161,  70,  15,   1;
  1, 17,  92, 252, 406, 406, 252,  92,  17,  1;
  1, 19, 117, 372, 714, 882, 714, 372, 117, 19, 1; ... (End)
		

Crossrefs

Row sums are A045623.
Columns include: A000326, A002412, A002418, A005408.

Programs

  • Magma
    A103450:= func< n,k | k eq 0 select 1 else Binomial(n, k)*(k*(n-k) + n)/n >;
    [A103450(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 17 2021
    
  • Mathematica
    (* First program *)
    p[x_, n_]:= p[x, n]= If[n==0, 1, (-1+x)^(n-2)*(1 -(n+1)*x +x^2)];
    T[n_, k_]:= T[n,k]= (-1)^(n+k)*SeriesCoefficient[p[x, n], {x, 0, k}];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* Roger L. Bagula and Gary W. Adamson, Oct 21 2008 *)(* corrected by G. C. Greubel, Jun 17 2021 *)
    (* Second program *)
    T[n_, k_]:= If[k==0, 1, Binomial[n, k]*(n*(k+1) -k^2)/n];
    Table[T[n, k], {n,0,16}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 17 2021 *)
  • Sage
    def A103450(n, k): return 1 if (k==0) else binomial(n, k)*(k*(n-k) + n)/n
    flatten([[A103450(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 17 2021

Formula

T(n, k) = binomial(n-1, k-1)*(k*(n-k) + n)/k with T(n, 0) = 1.
T(n, k) = T(n-1, k-1) + T(n-1, k) + binomial(n-2, k-1) with T(n, 0) = 1.
Column k is generated by (1+k*x)*x^k/(1-x)^(k+1).
Rows are coefficients of the polynomials P(0, x) = 1, P(n, x) = (1+x)^(n-2)*(1 +(n+1)*x + x^2) for n>0.
T(n,k) = Sum_{j=0..n} binomial(k, k-j)*binomial(n-k, j)*(j+1). - Paul Barry, Oct 28 2006
A signed version arises from the coefficients of the polynomials defined by: p(x, 0) = 1, p(x, 1) = (-1 +x), p(x, 2) = (1 -3*x +x^2), p(x,n) = (-1 +x)^(n-2)*(1 - (n + 1)*x + x^2); T(n, k) = (-1)^(n+k)*coefficient of x^k of ( p(x,n) ). - Roger L. Bagula and Gary W. Adamson, Oct 21 2008
T(2*n+1, n) = A141222(n). - Emanuele Munarini, Jun 01 2012 [corrected by Werner Schulte, Nov 27 2021]
G.f.: is 1 / ( (1-q*x/(1-x)) * (1-x/(1-q*x)) ). - Joerg Arndt, Aug 27 2013
Sum_{k=0..floor(n/2)} T(n-k, k) = (1/5)*((-n+5)*Fibonacci(n+1) + (3*n- 2)*Fibonacci(n)) = A208354(n). - G. C. Greubel, Jun 17 2021
T(2*n, n) = A000984(n) * (n + 2) / 2 for n >= 0. - Werner Schulte, Nov 27 2021

A085046 a(n) = n^2 - (1 + (-1)^n)/2.

Original entry on oeis.org

1, 3, 9, 15, 25, 35, 49, 63, 81, 99, 121, 143, 169, 195, 225, 255, 289, 323, 361, 399, 441, 483, 529, 575, 625, 675, 729, 783, 841, 899, 961, 1023, 1089, 1155, 1225, 1295, 1369, 1443, 1521, 1599, 1681, 1763, 1849, 1935, 2025, 2115, 2209, 2303, 2401, 2499, 2601
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 20 2003

Keywords

Comments

Sequence pattern looks like this 1*1, 1*3, 3*3, 3*5, 5*5, 5*7, 7*7, 7*9, 9*9, 9*11, 11*11, ... = A109613(n-1)*A109613(n).
a(n+1) is the determinant of the n X n matrix M_(i, i)=3, M_(i, j)=2 if (i+j) is even, M_(i, j)=0 if (i+j) is odd. - Benoit Cloitre, Aug 06 2003
a(n) is also the longest path, in number of cells, between diagonally opposite corners of an n X n matrix if diagonal movement between adjacent cells is not allowed and no cell is used more than once. - Ray G. Opao, Jul 02 2007
(-1)^n*a(n) appears to be the Hankel transform of A141222. - Paul Barry, Jun 14 2008
Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. 4*a(n) is the total number of unit edges in each figure (see example and cf. A255840, A255876). - Wesley Ivan Hurt, Mar 09 2015

Examples

			4*a(n) is the number of unit edges in the pattern below (see comments).
                                                                 _
                                                               _|_|_
                            _              _ _               _|_|_|_|_
                          _|_|_          _|_|_|_           _|_|_|_|_|_|_
              _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
    _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
   |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
                           |_|          |_|_|_|_|           |_|_|_|_|_|
                                          |_|_|               |_|_|_|
                                                                |_|
   n=1        n=2          n=3             n=4                  n=5
- _Wesley Ivan Hurt_, Mar 09 2015
		

Crossrefs

Cf. A109613. [Bruno Berselli, Sep 17 2013]

Programs

Formula

a(1) = 1, a(2) = 3, then a(2n) = (a(2n-1)*a(2n+1))^1/2 and a(2n+1) = {a(2n) + a(2n+2)}/2. Even-indexed terms are the geometric mean, and odd-indexed terms are the arithmetic mean, of their neighbors.
a(2n+1) = (2n+1)^2 and a(2n) = 4n^2 - 1.
a(n) = A008811(2n) - 1. - N. J. A. Sloane, Jun 12 2004
From Bruno Berselli, Sep 17 2013: (Start)
G.f.: x*(1 + x + 3*x^2 - x^3)/((1+x)*(1-x)^3).
a(n) = n^2 - (1 + (-1)^n)/2. (End)
a(1)=1, a(2)=3, a(3)=9, a(4)=15, a(n) = 2*a(n-1) + 0*a(n-2) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Oct 25 2015
E.g.f.: 1 - cosh(x) + x*(1 + x)*(cosh(x) + sinh(x)). - Stefano Spezia, May 26 2021
Sum_{n>=1} 1/a(n) = Pi^2/8 + 1/2. - Amiram Eldar, Aug 25 2022

Extensions

More terms from Benoit Cloitre, Aug 06 2003
Formula added in the first comment by Bruno Berselli, Sep 17 2013
Replaced name with Sep 17 2013 formula from Bruno Berselli [Wesley Ivan Hurt, May 17 2020]

A131056 A007318 * A131055.

Original entry on oeis.org

1, 3, 7, 17, 41, 97, 225, 513, 1153, 2561, 5633, 12289, 26625, 57345, 122881, 262145, 557057, 1179649, 2490369, 5242881, 11010049, 23068673, 48234497, 100663297, 209715201, 436207617, 905969665
Offset: 1

Views

Author

Gary W. Adamson, Jun 12 2007

Keywords

Examples

			a(4) = 17 = (1, 3, 3, 1) dot (1, 2, 2, 4) = (1 + 6 + 6 + 4).
		

Crossrefs

Programs

Formula

Binomial transform of A131055: (1, 2, 2, 4, 4, 6, 6, ...). A131056 = A131054 as an infinite lower triangular matrix * [1,2,3,...] as a vector.
G.f.: x*(1-2*x+2*x^3)/((1-x)*(1-2*x)^2); a(n)=-0^n/2+2^(n-1)*(n+1)+1. - Paul Barry, Jun 14 2008
a(n) = 2+A099035(n-1), n>1. - Juri-Stepan Gerasimov, Oct 02 2011

Extensions

More terms from Paul Barry, Jun 14 2008

A344054 a(n) = Sum_{k = 0..n} E1(n, k)*k^2, where E1 are the Eulerian numbers A173018.

Original entry on oeis.org

0, 0, 1, 8, 64, 540, 4920, 48720, 524160, 6108480, 76809600, 1037836800, 15008716800, 231437606400, 3792255667200, 65819609856000, 1206547550208000, 23297526540288000, 472708591939584000, 10055994967130112000, 223826984752250880000, 5202760944485744640000, 126075414965721661440000, 3179798058882852126720000, 83346901966165164687360000, 2267221868000212451328000000
Offset: 0

Views

Author

Peter Luschny, May 11 2021

Keywords

Comments

The Eulerian transform of the squares.

Crossrefs

Transforms of the squares: A151881 (StirlingCycle), A033452 (StirlingSet), A105219 (Laguerre), A103194 (Lah), A065096 (SchröderBig), A083411 (Fubini), A141222 (Narayana), A000330 (Units A000012).
Cf. A173018.

Programs

  • Maple
    a := n -> add(combinat[eulerian1](n, k)*k^2, k = 0..n):
    # Recurrence:
    a := proc(n) option remember; if n < 2 then 0 elif n = 2 then 1 else
    ((n-3)*(n-1)*(23*n-44)*a(n-2) + ((159 - 7*n)*n - 286)*a(n-1))/(16*(n - 2)) fi end:
    seq(a(n), n = 0..29);
  • Mathematica
    a[n_] := Sum[Sum[(-1)^j Binomial[n + 1, j] k^2 (k + 1 - j)^n, {j,0,k}], {k,0,n}]; a[0] := 0; Table[a[n], {n, 0, 25}]
  • SageMath
    def aList(len):
        R. = PowerSeriesRing(QQ, default_prec=len+2)
        f = x^2*(-x^2 + x - 3)/(6*(x - 1)^3)
        return f.egf_to_ogf().list()[:len]
    print(aList(20))

Formula

a(n) = n! * [x^n] x^2*(-x^2 + x - 3)/(6*(x - 1)^3).
a(n) = Sum_{k=0..n} Sum_{j=0..k} (-1)^j*binomial(n + 1, j)*k^2*(k + 1 - j)^n.
a(n) = ((n - 3)*(n - 1)*(23*n - 44)*a(n-2) + ((159 - 7*n)*n - 286)*a(n-1))/(16*(n - 2)) for n >= 3.
Showing 1-4 of 4 results.