A101688 Once 1, once 0, repeat, twice 1, twice 0, repeat, thrice 1, thrice 0, ... and so on.
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, 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, 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
Offset: 0
Examples
The array A (on the left) and the triangle T of its antidiagonals (on the right): 1 1 1 1 1 1 1 1 1 ......... 1 0 1 1 1 1 1 1 1 1 ........ 0 1 0 0 1 1 1 1 1 1 1 ....... 0 1 1 0 0 0 1 1 1 1 1 1 ...... 0 0 1 1 0 0 0 0 1 1 1 1 1 ..... 0 0 1 1 1 0 0 0 0 0 1 1 1 1 .... 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 ... 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 .. 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 . 0 0 0 0 1 1 1 1 1
References
- 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.
Links
- Boris Putievskiy, Transformations (of) Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
Crossrefs
Programs
-
Mathematica
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 *)
-
Python
from math import isqrt def A101688(n): return isqrt((m:=n<<1)+1)-(isqrt((m<<2)+8)+1>>1)+1 # Chai Wah Wu, Feb 10 2023
Formula
G.f.: 1/((1 - x*y)*(1 - y)).
G.f. of k-th row of the array: x^(k-1)/(1 - x).
T(n, k) = 1 if binomial(k, n-k) > 0, otherwise 0. - Paul Barry, Aug 23 2005
From Boris Putievskiy, Jan 09 2013: (Start)
a(n) = floor((2*n-t*(t+1)+1)/(t+3)), where
t = floor((-1+sqrt(8*n-7))/2). (End)
a(n) = floor(sqrt(2*n+1)) - floor(sqrt(2*n+1) - 1/2). - Ridouane Oudra, Jul 16 2020
E.g.f. of k-th column of the array: exp(x)*Gamma(1+k, x)/k!. - Stefano Spezia, Jun 16 2023
Extensions
Edited by N. J. A. Sloane, Dec 05 2020
Comments