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.

A318274 Triangle read by rows: T(n,k) = n for 0 < k < n and T(n,0) = T(n,n) = 1.

This page as a plain text file.
%I A318274 #38 Feb 16 2025 08:33:56
%S A318274 1,1,1,1,2,1,1,3,3,1,1,4,4,4,1,1,5,5,5,5,1,1,6,6,6,6,6,1,1,7,7,7,7,7,
%T A318274 7,1,1,8,8,8,8,8,8,8,1,1,9,9,9,9,9,9,9,9,1,1,10,10,10,10,10,10,10,10,
%U A318274 10,1,1,11,11,11,11,11,11,11,11,11,11,1,1,12
%N A318274 Triangle read by rows: T(n,k) = n for 0 < k < n and T(n,0) = T(n,n) = 1.
%C A318274 T(n,k) is the number of binary bitonic words of length n having k letters 1.
%C A318274 Draw a circular rosette such that all the circles contain the rosette's center. Then T(n,k) is also the number of regions in the plane located inside k circles. In fact, a region can be encoded by a binary bitonic word as follows: label each circle from 1 to n in clockwise or counterclockwise order, then write a length n binary word such that the i-th letter indicates whether the concerned region does (write 1) or does not (write 0) lie inside the i-th circle.
%C A318274 Row n is a partition of A014206(n-1) for n > 0.
%H A318274 N. Alon, H. Last, R. Pinchasi and M. Sharir, <a href="http://dx.doi.org/10.1007/s00454-001-0043-x">On the complexity of arrangements of circles in the plane</a>, Discrete Comput. Geom. Vol. 26 (2001), 465-492.
%H A318274 K. E. Batcher, <a href="https://doi.org/10.1145/1468075.1468121">Sorting networks and their applications</a>, Proceed. AFIPS Spring Joint Comput. Conf. 32 (1968), 307-314.
%H A318274 W. Denton, <a href="https://www.miskatonic.org/2014/12/19/intersecting-circles/">Intersecting circles</a>.
%H A318274 D. Kinsela, <a href="http://www.90thkilmacudscouts.com/maths/circles_lines_soln.html">Plane division by Lines AND Circles (Problem, Analysis and Solution)</a>.
%H A318274 H. W. Lang, <a href="https://web.archive.org/web/20200203130135/http://www.iti.fh-flensburg.de/lang/algorithmen/sortieren/bitonic/bitonicen.htm">Bitonic sequences</a>.
%H A318274 F. Ramaharo, <a href="https://arxiv.org/abs/1712.06543">Enumerating the states of the twist knot</a>, arXiv:1712.06543 [math.CO], 2017.
%H A318274 Franck Maminirina Ramaharo, <a href="/A318274/a318274.pdf">Illustration of initial terms</a>
%H A318274 P. Rosin, <a href="http://dx.doi.org/10.1007/s00004-001-0026-5">Rosettes and other arrangements of circles</a>, Nexus Network Journal Vol. 3 (2001), 113-126.
%H A318274 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PlaneDivisionbyCircles.html">Plane Division by Circles</a>.
%F A318274 The n-th row are the coefficients in the expansion of 1 + x^n + n*x*(1 - x^(n - 1))/(1 - x), n > 0.
%F A318274 G.f. for column k > 0: (((1 - k)*x^2 - (1 - k)*x + 1)*x^k)/(x - 1)^2.
%F A318274 T(n+1,n-k) - n + k = A128227(n,k).
%e A318274 Triangle begins:
%e A318274 n\k| 0  1  2  3  4  5  6  7  8
%e A318274 ---+--------------------------
%e A318274 0  | 1
%e A318274 1  | 1  1
%e A318274 2  | 1  2  1
%e A318274 3  | 1  3  3  1
%e A318274 4  | 1  4  4  4  1
%e A318274 5  | 1  5  5  5  5  1
%e A318274 6  | 1  6  6  6  6  6  1
%e A318274 7  | 1  7  7  7  7  7  7  1
%e A318274 8  | 1  8  8  8  8  8  8  8  1
%e A318274 ...
%e A318274 For n = 5, the binary bitonic words are
%e A318274 (k = 0) 00000;
%e A318274 (k = 1) 10000, 01000, 00100, 00010, 00001;
%e A318274 (k = 2) 11000, 01100, 00110, 00011, 10001;
%e A318274 (k = 3) 11100, 01110, 00111, 10011, 11001;
%e A318274 (k = 4) 11110, 01111, 10111, 11011, 11101;
%e A318274 (k = 5) 11111.
%t A318274 Table[If[k == n || k == 0, 1, n], {n, 0, 20}, {k, 0, n}] // Flatten
%o A318274 (Maxima)
%o A318274 T(n, k) := if k = 0 or k = n then 1 else if k < n then n else 0$
%o A318274 for n:0 thru 10 do print(makelist(T(n, k), k, 0, n));
%o A318274 (PARI) T(n,k) = if ((k==0) || (k==n), 1, n);
%o A318274 tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ _Michel Marcus_, Aug 25 2018
%o A318274 (Python)
%o A318274 from math import isqrt
%o A318274 def A318274(n): return 1 if 0<=(k:=n+1<<1)-(r:=(m:=isqrt(k))*(m+1))<=2 else m-(k<=r) # _Chai Wah Wu_, Nov 09 2024
%Y A318274 Row sums: A014206 preceded by 1.
%Y A318274 Cf. A007318, A128227.
%K A318274 nonn,easy,tabl
%O A318274 0,5
%A A318274 _Franck Maminirina Ramaharo_, Aug 23 2018