A097806 Riordan array (1+x, 1) read by rows.
1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
Offset: 0
Examples
Rows begin {1}, {1,1}, {0,1,1}, {0,0,1,1}... From _Boris Putievskiy_, Jan 17 2013: (Start) The start of the sequence as table: 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... 1..1..0..0..0..0..0... . . . The start of the sequence as triangle array read by rows: 1; 1, 1; 0, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1, 1; 0, 0, 0, 0, 1, 1; 0, 0, 0, 0, 0, 1, 1; 0, 0, 0, 0, 0, 0, 1, 1; . . . Row number r (r>4) contains (r-2) times '0' and 2 times '1'. (End)
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10010 (Rows 0 <= n <= 140)
- Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
Programs
-
Magma
[k eq n or k eq n-1 select 1 else 0: k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 11 2019
-
Maple
A097806 := proc(n,k) if k =n or k=n-1 then 1; else 0; end if; end proc: # R. J. Mathar, Jun 20 2015
-
Mathematica
Table[Boole[n <= # <= n+1] & /@ Range[n+1], {n, 0, 15}] // Flatten (* or *) Table[Floor[(# +2)/(n+2)] & /@ Range[n+1], {n, 0, 15}] // Flatten (* Michael De Vlieger, Jul 21 2016 *)
-
PARI
T(n, k) = if(k==n || k==n-1, 1, 0); \\ G. C. Greubel, Jul 11 2019
-
Sage
def T(n, k): if (k==n or k==n-1): return 1 else: return 0 [[T(n, k) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Jul 11 2019
Formula
T(n, k) = if(n=k or n-k=1, 1, 0).
a(n) = A103451(n+1). - Philippe Deléham, Oct 16 2007
From Boris Putievskiy, Jan 17 2013: (Start)
a(n) = floor((i+2)/(t+2)), n > 0,
where i=n-t*(t+1)/2, t=floor((-1+sqrt(8*n-7))/2). (End)
G.f.: (1+x)/(1-x*y). - R. J. Mathar, Aug 11 2015
Comments