A128227 Right border (1,1,1,...) added to A002260.
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
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)
Links
- A. Bogolmony, Number of Regions N Lines Divide Plane.
- Eric Weisstein's World of Mathematics, Plane Division by Lines.
- J. E. Wetzel, On the division of the plane by lines, The American Mathematical Monthly Vol. 85 (1978), 647-656.
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)
Comments