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.

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

This page as a plain text file.
%I A128227 #38 Feb 16 2025 08:33:04
%S A128227 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,
%T A128227 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,
%U A128227 3,4,5,6,7,8,9,10,11,1,1,2,3,4,5,6,7,8,9,10,11,12,1
%N A128227 Right border (1,1,1,...) added to A002260.
%C A128227 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, ...).
%C A128227 Eigensequence of the triangle = A005425: (1, 2, 5, 14, 43, ...). - _Gary W. Adamson_, Aug 27 2010
%C A128227 From _Franck Maminirina Ramaharo_, Aug 25 2018: (Start)
%C A128227 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.
%C A128227 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).
%C A128227 (End)
%H A128227 A. Bogolmony, <a href="http://www.cut-the-knot.org/proofs/LinesDividePlane.shtml">Number of Regions N Lines Divide Plane</a>.
%H A128227 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PlaneDivisionbyLines.html">Plane Division by Lines</a>.
%H A128227 J. E. Wetzel, <a href="http://dx.doi.org/10.2307/2320333">On the division of the plane by lines</a>, The American Mathematical Monthly Vol. 85 (1978), 647-656.
%F A128227 "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;...).
%F A128227 T(n,k) = k if 1<=k<n, and T(n,n) = 1. - _Hartmut F. W. Hoft_, Jun 10 2017
%F A128227 From _Franck Maminirina Ramaharo_, Aug 25 2018: (Start)
%F A128227 The n-th row are the coefficients in the expansion of ((x^2 + (n - 2)*x - n)*x^n + 1)/(x - 1)^2.
%F A128227 G.f. for column k: ((k*x + 1)*x^k)/(1 - x). (End)
%e A128227 First few rows of the triangle are:
%e A128227 1;
%e A128227 1, 1;
%e A128227 1, 2, 1;
%e A128227 1, 2, 3, 1;
%e A128227 1, 2, 3, 4, 1;
%e A128227 1, 2, 3, 4, 5, 1;
%e A128227 1, 2, 3, 4, 5, 6, 1;
%e A128227 1, 2, 3, 4, 5, 6, 7, 1;
%e A128227 1, 2, 3, 4, 5, 6, 7, 8, 1;
%e A128227 ...
%e A128227 From _Franck Maminirina Ramaharo_, Aug 25 2018: (Start)
%e A128227 For n = 5, the binary words are
%e A128227 (k = 0) 00000;
%e A128227 (k = 1) 10000, 00001;
%e A128227 (k = 2) 11000, 10001, 00011;
%e A128227 (k = 3) 11100, 11001, 10011, 00111;
%e A128227 (k = 4) 11110, 11101, 11011, 10111, 01111;
%e A128227 (k = 5) 11111.
%e A128227 (End)
%t A128227 (* first n rows of the triangle *)
%t A128227 a128227[n_] := Table[If[r==q, 1, q], {r, 1, n}, {q, 1, r}]
%t A128227 Flatten[a128227[13]] (* data *)
%t A128227 TableForm[a128227[5]] (* triangle *)
%t A128227 (* _Hartmut F. W. Hoft_, Jun 10 2017 *)
%o A128227 (Python)
%o A128227 def T(n, k): return 1 if n==k else k
%o A128227 for n in range(1, 11): print([T(n, k) for k in range(1, n + 1)]) # _Indranil Ghosh_, Jun 10 2017
%o A128227 (Python)
%o A128227 from math import comb, isqrt
%o A128227 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
%o A128227 (Maxima)
%o A128227 T(n, k) := if n = k then 1 else k + 1$
%o A128227 for n:0 thru 10 do print(makelist(T(n, k), k, 0, n)); /* _Franck Maminirina Ramaharo_, Aug 25 2018 */
%Y A128227 Cf. A002260, A128228, A000124, A006000, A318274.
%Y A128227 Cf. A005425. - _Gary W. Adamson_, Aug 27 2010
%K A128227 nonn,tabl
%O A128227 0,5
%A A128227 _Gary W. Adamson_, Feb 19 2007