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.

A101688 Once 1, once 0, repeat, twice 1, twice 0, repeat, thrice 1, thrice 0, ... and so on.

This page as a plain text file.
%I A101688 #81 Jun 25 2023 04:22:25
%S A101688 1,0,1,0,1,1,0,0,1,1,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,
%T A101688 1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,
%U A101688 0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1
%N A101688 Once 1, once 0, repeat, twice 1, twice 0, repeat, thrice 1, thrice 0, ... and so on.
%C A101688 The definition is that of a linear sequence. Equivalently, define a (0,1) infinite lower triangular matrix T(n,k) (0 <= k <= n) by T(n,k) = 1 if k >= n/2, 0 otherwise, and read it by rows. The triangle T begins:
%C A101688   1
%C A101688   0 1
%C A101688   0 1 1
%C A101688   0 0 1 1
%C A101688   0 0 1 1 1
%C A101688   0 0 0 1 1 1
%C A101688 ...  The matrix T is used in A168508. [Comment revised by _N. J. A. Sloane_, Dec 05 2020]
%C A101688 Also, square array A read by antidiagonals upwards: A(n,k) = 1 if k >= n, 0 otherwise.
%C A101688 For n >= 1, T(n,k) = number of partitions of n into k parts of sizes 1 or 2. - _Nicolae Boicu_, Aug 23 2018
%C A101688 T(n, k) is the number of ways to distribute n balls to k unlabeled urns in such a way that no urn receives more than one ball (see Beeler). - _Stefano Spezia_, Jun 16 2023
%D A101688 Robert A. Beeler, How to Count: An Introduction to Combinatorics and Its Applications, Springer International Publishing, 2015. See Proposition 4.2.1 at p. 98.
%H A101688 Boris Putievskiy, <a href="https://arxiv.org/abs/1212.2732">Transformations (of) Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012.
%F A101688 G.f.: 1/((1 - x*y)*(1 - y)).
%F A101688 G.f. of k-th row of the array: x^(k-1)/(1 - x).
%F A101688 T(n, k) = 1 if binomial(k, n-k) > 0, otherwise 0. - _Paul Barry_, Aug 23 2005
%F A101688 From _Boris Putievskiy_, Jan 09 2013: (Start)
%F A101688 a(n) = floor((2*A002260(n)+1)/A003056(n)+3).
%F A101688 a(n) = floor((2*n-t*(t+1)+1)/(t+3)), where
%F A101688 t = floor((-1+sqrt(8*n-7))/2). (End)
%F A101688 a(n) = floor(sqrt(2*n+1)) - floor(sqrt(2*n+1) - 1/2). - _Ridouane Oudra_, Jul 16 2020
%F A101688 a(n) = A103128(n+1) - A003056(n). - _Ridouane Oudra_, Apr 09 2022
%F A101688 E.g.f. of k-th column of the array: exp(x)*Gamma(1+k, x)/k!. - _Stefano Spezia_, Jun 16 2023
%e A101688 The array A (on the left) and the triangle T of its antidiagonals (on the right):
%e A101688   1 1 1 1 1 1 1 1 1 ......... 1
%e A101688   0 1 1 1 1 1 1 1 1 ........ 0 1
%e A101688   0 0 1 1 1 1 1 1 1 ....... 0 1 1
%e A101688   0 0 0 1 1 1 1 1 1 ...... 0 0 1 1
%e A101688   0 0 0 0 1 1 1 1 1 ..... 0 0 1 1 1
%e A101688   0 0 0 0 0 1 1 1 1 .... 0 0 0 1 1 1
%e A101688   0 0 0 0 0 0 1 1 1 ... 0 0 0 1 1 1 1
%e A101688   0 0 0 0 0 0 0 1 1 .. 0 0 0 0 1 1 1 1
%e A101688   0 0 0 0 0 0 0 0 1 . 0 0 0 0 1 1 1 1 1
%t A101688 rows = 15; A = Array[If[#1 <= #2, 1, 0]&, {rows, rows}]; Table[A[[i-j+1, j]], {i, 1, rows}, {j, 1, i}] // Flatten (* _Jean-François Alcover_, May 04 2017 *)
%o A101688 (Python)
%o A101688 from math import isqrt
%o A101688 def A101688(n): return isqrt((m:=n<<1)+1)-(isqrt((m<<2)+8)+1>>1)+1 # _Chai Wah Wu_, Feb 10 2023
%Y A101688 Row sums of T (and antidiagonal sums of A) are A008619.
%Y A101688 Cf. A079813, A168508.
%Y A101688 Cf. A103128, A003056.
%K A101688 nonn,tabl
%O A101688 0,1
%A A101688 _Ralf Stephan_, Dec 19 2004
%E A101688 Edited by _N. J. A. Sloane_, Dec 05 2020