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

A128229 A natural number transform, inverse of signed A094587.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 0, 0, 3, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Signed version of the transform (with -1, -2, -3, ... in the subdiagonal) gives A094587 having row sums A000522: (1, 2, 5, 16, 65, 236, ...). Unsigned inverse gives signed A094587 (with alternate signs); giving row sums = a signed variation of A094587 as follows: (1, 0, 1, -2, 9, -44, 265, -1854, ...). Binomial transform of the triangle = A093375.
Eigensequence of the triangle = A000085 starting (1, 2, 4, 10, 26, 76, ...). - Gary W. Adamson, Dec 29 2008

Examples

			First few rows of the triangle are:
1;
1, 1;
0, 2, 1;
0, 0, 3, 1;
0, 0, 0, 4, 1;
0, 0, 0, 0, 5, 1;
0, 0, 0, 0, 0, 6, 1;
0, 0, 0, 0, 0, 0, 7, 1;
...
		

Crossrefs

Programs

  • Mathematica
    a128229[n_] := Table[Which[r==q, 1, r-1==q, q, True, 0], {r, 1, n}, {q, 1, r}]
    Flatten[a128229[13]] (* data *)
    TableForm[a128229[8]] (* triangle *)
    (* Hartmut F. W. Hoft, Jun 10 2017 *)
  • Python
    def T(n, k): return 1 if n==k else n - 1 if k==n - 1 else 0
    for n in range(1, 11): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 10 2017

Formula

Infinite lower triangular matrix with (1,1,1,...) in the main diagonal and (1,2,3,...) in the subdiagonal.
T(n,n)=1, T(n,n-1)=n-1 and T(n,k)=0 for 1<=k<=n, 1<=n. - Hartmut F. W. Hoft, Jun 10 2017

A128227 Right border (1,1,1,...) added to A002260.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 6, 1, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1
Offset: 0

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = A000124: (1, 2, 4, 7, 11, 16, ...). n* each term of the triangle gives A128228, having row sums A006000: (1, 4, 12, 28, 55, ...).
Eigensequence of the triangle = A005425: (1, 2, 5, 14, 43, ...). - Gary W. Adamson, Aug 27 2010
From Franck Maminirina Ramaharo, Aug 25 2018: (Start)
T(n,k) is the number of binary words of length n having k letters 1 such that no 1's lie between any pair of 0's.
Let n lines with equations y = (i - 1)*x - (i - 1)^2, i = 1..n, be drawn in the Cartesian plane. For each line, call the half plane containing the point (-1,1) the upper half plane and the other half the lower half-plane. Then T(n,k) is the number of regions that are the intersections of k upper half-planes and n-k lower half-planes. Here, T(0,0) = 1 corresponds to the plane itself. A region obtained from this arrangement of lines can be associated with a length n binary word such that the i-th letter indicates whether the region is located at the i-th upper half-plane (letter 1) or at the lower half-plane (letter 0).
(End)

Examples

			First few rows of the triangle are:
1;
1, 1;
1, 2, 1;
1, 2, 3, 1;
1, 2, 3, 4, 1;
1, 2, 3, 4, 5, 1;
1, 2, 3, 4, 5, 6, 1;
1, 2, 3, 4, 5, 6, 7, 1;
1, 2, 3, 4, 5, 6, 7, 8, 1;
...
From _Franck Maminirina Ramaharo_, Aug 25 2018: (Start)
For n = 5, the binary words are
(k = 0) 00000;
(k = 1) 10000, 00001;
(k = 2) 11000, 10001, 00011;
(k = 3) 11100, 11001, 10011, 00111;
(k = 4) 11110, 11101, 11011, 10111, 01111;
(k = 5) 11111.
(End)
		

Crossrefs

Programs

  • Mathematica
    (* first n rows of the triangle *)
    a128227[n_] := Table[If[r==q, 1, q], {r, 1, n}, {q, 1, r}]
    Flatten[a128227[13]] (* data *)
    TableForm[a128227[5]] (* triangle *)
    (* Hartmut F. W. Hoft, Jun 10 2017 *)
  • Maxima
    T(n, k) := if n = k then 1 else k + 1$
    for n:0 thru 10 do print(makelist(T(n, k), k, 0, n)); /* Franck Maminirina Ramaharo, Aug 25 2018 */
  • Python
    def T(n, k): return 1 if n==k else k
    for n in range(1, 11): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 10 2017
    
  • Python
    from math import comb, isqrt
    def A128227(n): return n-comb(r:=(m:=isqrt(k:=n+1<<1))+(k>m*(m+1))+1,2)+(2 if k==m*(m+1) else r) # Chai Wah Wu, Nov 09 2024
    

Formula

"1" added to each row of "start counting again": (1; 1,2; 1,2,3,...) such that a(1) = 1, giving: (1; 1,1; 1,2,1;...).
T(n,k) = k if 1<=kHartmut F. W. Hoft, Jun 10 2017
From Franck Maminirina Ramaharo, Aug 25 2018: (Start)
The n-th row are the coefficients in the expansion of ((x^2 + (n - 2)*x - n)*x^n + 1)/(x - 1)^2.
G.f. for column k: ((k*x + 1)*x^k)/(1 - x). (End)
Showing 1-2 of 2 results.