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

A103451 Triangular array T read by rows: T(n, 0) = T(n, n) = 1, T(n, k) = 0 for 0 < k < n.

Original entry on oeis.org

1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

Equals Pascal's triangle (A007318) where all elements > 1 are replaced with zero. Therefore it might be called "binomial skeleton".
Row sums are in A040000, antidiagonal sums are in A040001. When construed as a lower triangular matrix, the matrix inverse is A103452.

Examples

			First few rows are:
  1;
  1, 1;
  1, 0, 1;
  1, 0, 0, 1;
  1, 0, 0, 0, 1;
  1, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Magma
    r:=14; T:=ScalarMatrix(r, 1); for n in [1..r] do T[n, 1]:=1; end for; &cat[ [ T[n, k]: k in [1..n] ]: n in [1..r] ];
    
  • Magma
    /* As triangle */ [[Binomial(n, k-n)+Binomial(n, -k)-Binomial(0, n+k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 20 2016
    
  • Mathematica
    Table[Boole[n == 0 || Mod[k, n] == 0], {n, 0, 14}, {k, 0, n}] (* or *)
    Table[Binomial[n, k - n] + Binomial[n, -k] - Binomial[0, n + k], {n, 0, 14}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    for(n=0,15, for(k=0,n, print1(if(k==0||k==n, 1, 0), ", "))) \\ G. C. Greubel, Dec 08 2018
    
  • Python
    from math import isqrt, comb
    def A103451(n):
        if n==0: return 1
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return int(not (n-comb(a+1,2))%a) # Chai Wah Wu, Jun 24 2025
  • Sage
    def A103451(n,k): return 1 if (k==0 or k==n) else 0
    flatten([[A103451(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Feb 14 2021
    

Formula

a(n) = A097806(n-1) for n > 0. - Philippe Deléham, Oct 16 2007
T(n,k) = C(n,k-n) + C(n,-k) - C(0,n+k), 0 <= k <= n. - Eric Werley, Jul 01 2011
From Stefano Spezia, Jul 04 2024: (Start)
G.f.: (1 - x^2*y)/((1 - x)*(1 - x*y)).
E.g.f.: BesselI(0, 2*sqrt(x*y)) + exp(x) - 1. (End)

Extensions

Edited by Klaus Brockhaus, Jan 26 2011

A103454 a(n) = 0^n + 4^n - 1.

Original entry on oeis.org

1, 3, 15, 63, 255, 1023, 4095, 16383, 65535, 262143, 1048575, 4194303, 16777215, 67108863, 268435455, 1073741823, 4294967295, 17179869183, 68719476735, 274877906943, 1099511627775, 4398046511103, 17592186044415, 70368744177663
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

A transform of 4^n under the matrix A103452.
The square of the cotangent of the arcsin of 1/(2^n). - Al Hakanson (hawkuu(AT)excite.com), Feb 23 2006

Crossrefs

Programs

Formula

G.f.: (1 - 2*x + 4*x^2)/((1-x)*(1-4*x));
a(n) = Sum_{k=0..n} A103452(n, k)*4^k;
a(n) = Sum_{k=0..n} (2*0^(n-k) - 1)*0^(k*(n-k))4^k.
a(n) = A024036(n), n > 0. - R. J. Mathar, Aug 30 2008
E.g.f.: 1 - exp(x) + exp(4*x). - G. C. Greubel, Jun 21 2021
a(n) = 5*a(n-1) - 4*a(n-2). - Wesley Ivan Hurt, Mar 17 2023

A206735 Triangle T(n,k), read by rows, given by (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.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 6, 4, 1, 0, 5, 10, 10, 5, 1, 0, 6, 15, 20, 15, 6, 1, 0, 7, 21, 35, 35, 21, 7, 1, 0, 8, 28, 56, 70, 56, 28, 8, 1, 0, 9, 36, 84, 126, 126, 84, 36, 9, 1, 0, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 11 2012

Keywords

Comments

A103452*A007318 as infinite lower triangular matrices.
Essentially the same as A199011.

Examples

			Triangle begins :
1
0, 1
0, 2, 1
0, 3, 3, 1
0, 4, 6, 4, 1
0, 5, 10, 10, 5, 1
0, 6, 15, 20, 15, 6, 1
0, 7, 21, 35, 35, 21, 7, 1
0, 8, 28, 56, 70, 56, 28, 8, 1
0, 9, 36, 84, 126, 126, 84, 36, 9, 1
0, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1
0, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1
		

Crossrefs

Cf. A007318, A000071 (antidiagonal sums).

Formula

T(n,k) = A007318(n,k) - A073424(n,k).
Sum_{k, 0<=k<=n} T(n,k)*x^k = (1+x)^n - 1 + 0^n.
T(n,0) = 0^n = A000007(n), T(n,k) = binomial(n,k) for k>0.
G.f.: (1-2*x+(1+y)*x^2)/(1-2x+(1+y)*x^2-y*x).
Sum{k, 0<=k<=n} T(n,k)^x = A000027(n+1), A000225(n), A030662(n), A096191(n), A096192(n) for x = 0, 1, 2, 3, 4 respectively.

A103455 a(n) = 0^n + 5^n - 1.

Original entry on oeis.org

1, 4, 24, 124, 624, 3124, 15624, 78124, 390624, 1953124, 9765624, 48828124, 244140624, 1220703124, 6103515624, 30517578124, 152587890624, 762939453124, 3814697265624, 19073486328124, 95367431640624, 476837158203124
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

A transform of 5^n under the matrix A103452.

Crossrefs

Programs

Formula

G.f.: (1 - 2*x + 5*x^2)/((1-x)*(1-5*x)).
a(n) = Sum_{k=0..n} A103452(n, k)*5^k.
a(n) = Sum_{k=0..n} (2*0^(n-k) - 1)*0^(k*(n-k))*5^k.
a(n) = A024049(n), n > 0. - R. J. Mathar, Aug 30 2008
E.g.f.: 1 - exp(x) + exp(5*x). - G. C. Greubel, Jun 21 2021

A103453 a(n) = 0^n + 3^n - 1.

Original entry on oeis.org

1, 2, 8, 26, 80, 242, 728, 2186, 6560, 19682, 59048, 177146, 531440, 1594322, 4782968, 14348906, 43046720, 129140162, 387420488, 1162261466, 3486784400, 10460353202, 31381059608, 94143178826, 282429536480, 847288609442
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

A transform of 3^n under the matrix A103452.
a(n) is the number of moves required to solve a Towers of Hanoi puzzle of 3 towers in a line (no direct connection between the two towers on the ends) with n pieces to be moved from one end tower to the other. This is easily proved through demonstration. - Roderick Kimball, Nov 22 2015

Crossrefs

Cf. A103452.
Essentially identical to A024023.

Programs

  • Magma
    [0^n+3^n-1: n in [0..30] ]; // Vincenzo Librandi, Apr 30 2011
    
  • Mathematica
    Table[If[n==0, 1, 3^n -1], {n, 0, 30}] (* G. C. Greubel, Jun 18 2021 *)
    LinearRecurrence[{4,-3},{1,2,8},30] (* Harvey P. Dale, Feb 13 2022 *)
  • PARI
    a(n) = if(n==0, 1, 3^n-1); \\ Altug Alkan, Nov 22 2015
    
  • Sage
    [3^n -1 +0^n for n in (0..30)] # G. C. Greubel, Jun 18 2021

Formula

G.f.: (1 -2*x +3*x^2)/((1-x)*(1-3*x)).
a(n) = Sum_{k=0..n} A103452(n, k)*3^k.
a(n) = Sum_{k=0..n} (2*0^(n-k) - 1)*0^(k*(n-k))*3^k.
From G. C. Greubel, Jun 18 2021: (Start)
E.g.f.: 1 - exp(x) + exp(3*x).
a(n) = [n=0] + 2*A003462(n). (End)

A103456 a(n) = 0^n + 10^n - 1.

Original entry on oeis.org

1, 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, 9999999999, 99999999999, 999999999999, 9999999999999, 99999999999999, 999999999999999, 9999999999999999, 99999999999999999, 999999999999999999
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

A transform of 10^n under the matrix A103452.
Except for n = 0, the same as A002283. - Felix Fröhlich, Jun 22 2021

Crossrefs

Programs

  • Magma
    [1] cat [10^n -1: n in [1..40]]; // G. C. Greubel, Jun 21 2021
    
  • Mathematica
    Table[Boole[n==0] + 10^n -1, {n,0,40}] (* Alonso del Arte, Nov 03 2019 *)
  • PARI
    a(n) = 0^n + 10^n - 1 \\ Felix Fröhlich, Jun 22 2021
    
  • PARI
    Vec((1 - 2*x + 10*x^2)/((1 - x)*(1 - 10*x)) + O(x^20)) \\ Felix Fröhlich, Jun 22 2021
  • Sage
    [1]+[10^n -1 for n in (1..40)] # G. C. Greubel, Jun 21 2021
    

Formula

G.f.: (1 - 2*x + 10*x^2)/((1 - x)*(1 - 10*x));
a(n) = Sum_{k = 0..n} A103452(n, k)*10^k;
a(n) = Sum_{k = 0..n} (2*0^(n-k) - 1)*0^(k*(n-k))*10^k.
a(n) = A002283(n), n > 0. - R. J. Mathar, Aug 30 2008
E.g.f.: 1 - exp(x) + exp(10*x). - G. C. Greubel, Jun 21 2021
Showing 1-6 of 6 results.