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.

A112468 Riordan array (1/(1-x), x/(1+x)).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 2, -2, 1, 1, 1, -2, 4, -3, 1, 1, 0, 3, -6, 7, -4, 1, 1, 1, -3, 9, -13, 11, -5, 1, 1, 0, 4, -12, 22, -24, 16, -6, 1, 1, 1, -4, 16, -34, 46, -40, 22, -7, 1, 1, 0, 5, -20, 50, -80, 86, -62, 29, -8, 1, 1, 1, -5, 25, -70, 130, -166, 148, -91, 37, -9, 1, 1, 0, 6, -30, 95, -200, 296, -314, 239, -128, 46, -10, 1
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Row sums are A040000. Diagonal sums are A112469. Inverse is A112467. Row sums of k-th power are 1, k+1, k+1, k+1, .... Note that C(n,k) = Sum_{j=0..n-k} C(n-j-1, n-k-j).
Equals row reversal of triangle A112555 up to sign, where log(A112555) = A112555 - I. Unsigned row sums equals A052953 (Jacobsthal numbers + 1). Central terms of even-indexed rows are a signed version of A072547. Sums of squared terms in rows yields A112556, which equals the first differences of the unsigned central terms. - Paul D. Hanna, Jan 20 2006
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 respectively (see the square array in A112739). - Philippe Deléham, Feb 22 2014

Examples

			Triangle starts
  1;
  1,  1;
  1,  0,  1;
  1,  1, -1,  1;
  1,  0,  2, -2,  1;
  1,  1, -2,  4, -3,  1;
  1,  0,  3, -6,  7, -4,  1;
Matrix log begins:
  0;
  1,  0;
  1,  0,  0;
  1,  1, -1,  0;
  1,  1,  1, -2,  0;
  1,  1,  1,  1, -3,  0; ...
Production matrix begins
  1,  1,
  0, -1,  1,
  0,  0, -1,  1,
  0,  0,  0, -1,  1,
  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0,  0, -1,  1.
- _Paul Barry_, Apr 08 2011
		

Crossrefs

Cf. A174294, A174295, A174296, A174297. - Mats Granvik, Mar 15 2010
Cf. A072547 (central terms), A112555 (reversed rows), A112465, A052953, A112556, A112739, A119258.
See A279006 for another version.

Programs

  • GAP
    T:= function(n,k)
        if k=0 or k=n then return 1;
        else return T(n-1,k-1) - T(n-1,k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 13 2019
  • Haskell
    a112468 n k = a112468_tabl !! n !! k
    a112468_row n = a112468_tabl !! n
    a112468_tabl = iterate (\xs -> zipWith (-) ([2] ++ xs) (xs ++ [0])) [1]
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Magma
    function T(n,k)
      if k eq 0 or k eq n then return 1;
      else return T(n-1,k-1) - T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 13 2019
    
  • Maple
    T := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k,k+1)*hypergeom( [1,n+1],[k+2],m)/(k+1)!; A112468 := (n,k) -> T(n,n-k,-1);
    seq(print(seq(simplify(A112468(n,k)),k=0..n)),n=0..10); # Peter Luschny, Jul 25 2014
  • Mathematica
    T[n_, 0] = 1; T[n_, n_] = 1; T[n_, k_ ]:= T[n, k] = T[n-1, k-1] - T[n-1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* Jean-François Alcover, Mar 06 2013 *)
  • PARI
    {T(n,k)=local(m=1,x=X+X*O(X^n),y=Y+Y*O(Y^k)); polcoeff(polcoeff((1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x),n,X),k,Y)} \\ Paul D. Hanna, Jan 20 2006
    
  • PARI
    T(n,k) = if(k==0 || k==n, 1, T(n-1, k-1) - T(n-1, k)); \\ G. C. Greubel, Nov 13 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or n<0): return 0
        elif (k==0 or k==n): return 1
        else: return T(n-1, k-1) - T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 13 2019
    

Formula

Triangle T(n,k) read by rows: T(n,0)=1, T(n,k) = T(n-1,k-1) - T(n-1,k). - Mats Granvik, Mar 15 2010
Number triangle T(n, k)= Sum_{j=0..n-k} C(n-j-1, n-k-j)*(-1)^(n-k-j).
G.f. of matrix power T^m: (1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x). G.f. of matrix log: x*(1-2*x*y+x^2*y)/(1-x*y)^2/(1-x). - Paul D. Hanna, Jan 20 2006
T(n, k) = R(n,n-k,-1) where R(n,k,m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k,k+1)*hyper2F1([1,n+1],[k+2],m)/(k+1)!. - Peter Luschny, Jul 25 2014

A112739 Array counting nodes in rooted trees of height n in which the root and internal nodes have valency k (and the leaf nodes have valency one).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 5, 2, 1, 1, 5, 10, 7, 2, 1, 1, 6, 17, 22, 9, 2, 1, 1, 7, 26, 53, 46, 11, 2, 1, 1, 8, 37, 106, 161, 94, 13, 2, 1, 1, 9, 50, 187, 426, 485, 190, 15, 2, 1, 1, 10, 65, 302, 937, 1706, 1457, 382, 17, 2, 1, 1, 11, 82, 457, 1814, 4687, 6826, 4373, 766, 19
Offset: 0

Views

Author

Paul Barry, Sep 16 2005

Keywords

Comments

Rows of the square array have g.f. (1+x)/((1-x)(1-kx)). They are the partial sums of the coordination sequences for the infinite tree of valency k. Row sums are A112740.
Rows of the square array are successively: A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, A238276, A138894, A090843, A199023. - Philippe Deléham, Feb 22 2014

Examples

			As a square array, rows begin
1,1,1,1,1,1,... (A000012)
1,2,2,2,2,2,... (A040000)
1,3,5,7,9,11,... (A005408)
1,4,10,22,46,94,... (A033484)
1,5,17,53,161,485,... (A048473)
1,6,26,106,426,1706,... (A020989)
1,7,37,187,937,4687,... (A057651)
1,8,50,302,1814,10886,... (A061801)
As a number triangle, rows start
1;
1,1;
1,2,1;
1,3,2,1;
1,4,5,2,1;
1,5,10,7,2,1;
		

References

  • L. He, X. Liu and G. Strang, (2003) Trees with Cantor Eigenvalue Distribution. Studies in Applied Mathematics 110 (2), 123-138.
  • L. He, X. Liu and G. Strang, Laplacian eigenvalues of growing trees, Proc. Conf. on Math. Theory of Networks and Systems, Perpignan (2000).

Crossrefs

Formula

As a square array read by antidiagonals, T(n, k)=sum{j=0..k, (2-0^j)*(n-1)^(k-j)}; T(n, k)=(n(n-1)^k-2)/(n-2), n<>2, T(2, n)=2n+1; T(n, k)=sum{j=0..k, (n(n-1)^j-0^j)/(n-1)}, j<>1. As a triangle read by rows, T(n, k)=if(k<=n, sum{j=0..k, (2-0^j)*(n-k-1)^(k-j)}, 0).

A238275 a(n) = (4*7^n - 1)/3.

Original entry on oeis.org

1, 9, 65, 457, 3201, 22409, 156865, 1098057, 7686401, 53804809, 376633665, 2636435657, 18455049601, 129185347209, 904297430465, 6330082013257, 44310574092801, 310174018649609, 2171218130547265, 15198526913830857, 106389688396816001, 744727818777712009
Offset: 0

Views

Author

Philippe Deléham, Feb 21 2014

Keywords

Comments

Sum of n-th row of triangle of powers of 7: 1; 1 7 1; 1 7 49 7 1; 1 7 49 343 49 7 1; ...
Number of cubes in the crystal structure cubic carbon CCC(n+1), defined in the Baig et al. and in the Gao et al. references. - Emeric Deutsch, May 28 2018

Examples

			a(0) = 1;
a(1) = 1 + 7 + 1 = 9;
a(2) = 1 + 7 + 49 + 7 + 1 = 65;
a(3) = 1 + 7 + 49 + 343 + 49 + 7 + 1 = 457; etc.
		

Crossrefs

Cf. Similar sequences: A151575, A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, this sequence, A238276, A138894, A090843, A199023.

Programs

Formula

G.f.: (1+x)/((1-x)*(1-7*x)).
a(n) = 7*a(n-1) + 2, a(0) = 1.
a(n) = 8*a(n-1) - 7*a(n-2), a(0) = 1, a(1) = 9.
a(n) = Sum_{k=0..n} A112468(n,k)*8^k.
E.g.f.: exp(x)*(4*exp(6*x) - 1)/3. - Stefano Spezia, Feb 12 2025

A238303 Triangle T(n,k), 0<=k<=n, read by rows given by T(n,0) = 1, T(n,k) = 2 if k>0.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2014

Keywords

Comments

Row sums are A005408(n).
Diagonals sums are A109613(n).
Sum_{k=0..n} T(n,k)*x^k = A033999(n), A000012(n), A005408(n), A036563(n+2), A058481(n+1), A083584(n), A137410(n), A233325(n), A233326(n), A233328(n), A211866(n+1), A165402(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A151575(n), A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively.
Sum_{k=0..n} T(n,k)^x = A000027(n+1), A005408(n), A016813(n), A017077(n) for x = 0, 1, 2, 3 respectively.
Sum_{k=0..n} k*T(n,k) = A002378(n).
Sum_{k=0..n} A000045(k)*T(n,k) = A019274(n+2).
Sum_{k=0..n} A000142(k)*T(n,k) = A066237(n+1).

Examples

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

Crossrefs

Cf. Diagonals: A040000.
Cf. Columns: A000012, A007395.
First differences of A001614.

Programs

Formula

T(n,0) = A000012(n) = 1, T(n+k,k) = A007395(n) = 2 for k>0.

Extensions

Data section extended to a(104) by Antti Karttunen, Jan 19 2025
Showing 1-4 of 4 results.